-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): provide more specific warnings for runtime compilation
close #1004
- Loading branch information
Showing
6 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
// This entry exports the runtime only, and is built as | ||
// `dist/vue.esm-bundler.js` which is used by default for bundlers. | ||
import './devCheck' | ||
import { warn } from '@vue/runtime-dom' | ||
|
||
export * from '@vue/runtime-dom' | ||
|
||
import './devCheck' | ||
export const compile = () => { | ||
if (__DEV__) { | ||
warn( | ||
`Runtime compilation is not supported in this build of Vue.` + | ||
(__ESM_BUNDLER__ | ||
? ` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` | ||
: __ESM_BROWSER__ | ||
? ` Use "vue.esm-browser.js" instead.` | ||
: __GLOBAL__ | ||
? ` Use "vue.global.js" instead.` | ||
: ``) /* should not happen */ | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters