Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
feat!: initial vite 4 implementation for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 5, 2022
1 parent c307ee8 commit 74c84fa
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 90 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -36,7 +36,7 @@
"nuxt": "workspace:*",
"nuxt3": "workspace:nuxt@*",
"unbuild": "^1.0.0",
"vite": "^3.2.5",
"vite": "^4.0.0-alpha.6",
"vue": "3.2.45"
},
"devDependencies": {
Expand Down Expand Up @@ -72,7 +72,7 @@
"typescript": "^4.9.3",
"ufo": "^1.0.1",
"unbuild": "^1.0.0",
"vite": "^3.2.5",
"vite": "^4.0.0-alpha.6",
"vitest": "^0.25.3",
"vue-tsc": "^1.0.11"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/schema/package.json
Expand Up @@ -16,11 +16,11 @@
"devDependencies": {
"@types/lodash.template": "^4",
"@types/semver": "^7",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue": "^4.0.0-alpha.2",
"@unhead/schema": "^1.0.7",
"nitropack": "^1.0.0",
"unbuild": "latest",
"vite": "~3.2.5"
"vite": "~4.0.0-alpha.6"
},
"dependencies": {
"c12": "^1.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/vite/package.json
Expand Up @@ -21,8 +21,8 @@
"dependencies": {
"@nuxt/kit": "3.0.0",
"@rollup/plugin-replace": "^5.0.1",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1",
"@vitejs/plugin-vue": "^4.0.0-alpha.2",
"@vitejs/plugin-vue-jsx": "^3.0.0-alpha.0",
"autoprefixer": "^10.4.13",
"chokidar": "^3.5.3",
"cssnano": "^5.1.14",
Expand All @@ -48,7 +48,7 @@
"rollup-plugin-visualizer": "^5.8.3",
"ufo": "^1.0.1",
"unplugin": "^1.0.0",
"vite": "~3.2.5",
"vite": "~4.0.0-alpha.6",
"vite-node": "^0.25.3",
"vite-plugin-checker": "^0.5.1",
"vue-bundle-renderer": "^1.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/vite/src/server.ts
Expand Up @@ -83,10 +83,10 @@ export async function buildServer (ctx: ViteBuildContext) {
external: ['#internal/nitro', ...ctx.nuxt.options.experimental.externalVue ? ['vue', 'vue-router'] : []],
output: {
entryFileNames: 'server.mjs',
preferConst: true,
// TODO: https://github.com/vitejs/vite/pull/8641
inlineDynamicImports: !ctx.nuxt.options.experimental.viteServerDynamicImports,
format: 'module'
format: 'module',
generatedCode: {
constBindings: true
}
},
onwarn (warning, rollupWarn) {
if (warning.code && ['UNUSED_EXTERNAL_IMPORT'].includes(warning.code)) {
Expand Down

0 comments on commit 74c84fa

Please sign in to comment.