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

fix(vite): remove conflicting vite aliases #1624

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/bridge/src/vite/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ async function bundle (nuxt: Nuxt, builder: any) {
'#build': nuxt.options.buildDir,
'.nuxt': nuxt.options.buildDir,
'/.nuxt/entry.mjs': resolve(nuxt.options.buildDir, 'client.js'),
'~': nuxt.options.srcDir,
'@': nuxt.options.srcDir,
'web-streams-polyfill/ponyfill/es2018': resolve(distDir, 'runtime/vite/mock/web-streams-polyfill.mjs'),
'whatwg-url': resolve(distDir, 'runtime/vite/mock/whatwg-url.mjs'),
// Cannot destructure property 'AbortController' of ..
Expand Down
6 changes: 1 addition & 5 deletions packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ export async function bundle (nuxt: Nuxt) {
// will be filled in client/server configs
'#build/plugins': '',
'#build': nuxt.options.buildDir,
'/build': nuxt.options.buildDir,
'/app': nuxt.options.appDir,
'/entry.mjs': resolve(nuxt.options.appDir, 'entry'),
'~': nuxt.options.srcDir,
'@': nuxt.options.srcDir,
'web-streams-polyfill/ponyfill/es2018': 'unenv/runtime/mock/empty',
// Cannot destructure property 'AbortController' of ..
'abort-controller': 'unenv/runtime/mock/empty'
Expand Down Expand Up @@ -98,7 +94,7 @@ export async function bundle (nuxt: Nuxt) {

nuxt.hook('vite:serverCreated', (server: vite.ViteDevServer) => {
const start = Date.now()
warmupViteServer(server, ['/app/entry.mjs']).then(() => {
warmupViteServer(server, ['/entry.mjs']).then(() => {
consola.info(`Vite warmed up in ${Date.now() - start}ms`)
}).catch(consola.error)
})
Expand Down