Skip to content

Commit

Permalink
refactor: move externalVue to vue.externalLib
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Apr 6, 2023
1 parent 692518a commit 3cb8223
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions packages/schema/src/config/app.ts
Expand Up @@ -7,6 +7,14 @@ export default defineUntypedSchema({
* Vue.js config
*/
vue: {
/**
* Externalize `vue`, `@vue/*` and `vue-router` when building your server.
*
* @see https://github.com/nuxt/nuxt/issues/13632
*/
externalLib: {
$resolve: async (val, get) => val ?? (await get('experimental.externalVue')) ?? true
},
/**
* Options for the Vue compiler that will be passed at build time.
* @see [documentation](https://vuejs.org/api/application.html#app-config-compileroptions)
Expand Down
10 changes: 9 additions & 1 deletion packages/schema/src/config/experimental.ts
Expand Up @@ -18,8 +18,16 @@ export default defineUntypedSchema({
/**
* Externalize `vue`, `@vue/*` and `vue-router` when building.
* @see https://github.com/nuxt/nuxt/issues/13632
* @deprecated This can now be configured with `vue.externalLib`
*/
externalVue: true,
externalVue: {
$resolve: (val) => {
if (val !== undefined) {
console.warn('Your setting for `experimental.externalVue` should be moved to `vue.externalLib`.')
}
return val ?? true
}
},

// TODO: move to `vue.runtimeCompiler` in v3.5
/**
Expand Down

0 comments on commit 3cb8223

Please sign in to comment.