Skip to content

Commit 1f2ae83

Browse files
committed
chore: add warning for pre-rc7 ts projects
1 parent 352d3bb commit 1f2ae83

File tree

1 file changed

+10
-0
lines changed
  • packages/@vue/cli-plugin-typescript

1 file changed

+10
-0
lines changed

packages/@vue/cli-plugin-typescript/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
module.exports = (api, options) => {
2+
// pre-rc7 warning
3+
try {
4+
require('typescript/package.json')
5+
} catch (e) {
6+
throw new Error(
7+
`"typescript" is now a peer dependency of "@vue/cli-plugin-typescript".\n` +
8+
`To fix the build, explicitly install typescript in your project.`
9+
)
10+
}
11+
212
const fs = require('fs')
313
const useThreads = process.env.NODE_ENV === 'production' && options.parallel
414

0 commit comments

Comments
 (0)