2022-02-25 12:42:34 +00:00
|
|
|
export default {
|
2022-04-01 13:02:26 +00:00
|
|
|
/** @version 3 */
|
|
|
|
experimental: {
|
|
|
|
/**
|
2022-04-16 13:53:36 +00:00
|
|
|
* Set to true to generate an async entry point for the Vue bundle (for module federation support).
|
2022-04-01 13:02:26 +00:00
|
|
|
*/
|
|
|
|
asyncEntry: {
|
2022-08-13 12:43:26 +00:00
|
|
|
$resolve: (val, get) => val ?? false
|
2022-04-01 13:02:26 +00:00
|
|
|
},
|
2022-03-11 08:41:27 +00:00
|
|
|
|
2022-04-01 13:02:26 +00:00
|
|
|
/**
|
2022-08-13 12:43:26 +00:00
|
|
|
* Enable Vue's reactivity transform
|
2022-04-01 13:02:26 +00:00
|
|
|
* @see https://vuejs.org/guide/extras/reactivity-transform.html
|
|
|
|
*/
|
2022-06-10 14:31:36 +00:00
|
|
|
reactivityTransform: false,
|
|
|
|
|
|
|
|
/**
|
2022-08-11 21:25:35 +00:00
|
|
|
* Externalize `vue`, `@vue/*` and `vue-router` when building.
|
2022-06-10 14:31:36 +00:00
|
|
|
* @see https://github.com/nuxt/framework/issues/4084
|
|
|
|
*/
|
2022-08-23 11:35:00 +00:00
|
|
|
externalVue: true,
|
2022-07-17 13:13:04 +00:00
|
|
|
|
|
|
|
/**
|
2022-08-11 21:25:35 +00:00
|
|
|
* Tree shakes contents of client-only components from server bundle.
|
2022-07-17 13:13:04 +00:00
|
|
|
* @see https://github.com/nuxt/framework/pull/5750
|
|
|
|
*/
|
|
|
|
treeshakeClientOnly: false,
|
2022-08-08 13:25:58 +00:00
|
|
|
|
2022-08-13 12:43:26 +00:00
|
|
|
/**
|
|
|
|
* Use vite-node for on-demand server chunk loading
|
|
|
|
*
|
|
|
|
* @deprecated use `vite.devBundler: 'vite-node'`
|
|
|
|
*/
|
|
|
|
viteNode: {
|
|
|
|
$resolve: (val) => {
|
|
|
|
val = process.env.EXPERIMENTAL_VITE_NODE ? true : val
|
|
|
|
if (val === true) {
|
|
|
|
console.warn('`vite-node` is now enabled by default. You can safely remove `experimental.viteNode` from your config.')
|
|
|
|
} else if (val === false) {
|
|
|
|
console.warn('`vite-node` is now enabled by default. To disable it, set `vite.devBundler` to `legacy` instead.')
|
|
|
|
}
|
|
|
|
return val ?? true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-08-08 13:25:58 +00:00
|
|
|
/**
|
2022-08-11 21:25:35 +00:00
|
|
|
* Split server bundle into multiple chunks and dynamically import them.
|
2022-08-08 13:25:58 +00:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see https://github.com/nuxt/framework/issues/6432
|
|
|
|
*/
|
2022-08-23 11:35:00 +00:00
|
|
|
viteServerDynamicImports: true
|
2022-04-01 13:02:26 +00:00
|
|
|
}
|
2022-02-25 12:42:34 +00:00
|
|
|
}
|