fix(vite): remove conflicting vite aliases (#1624)

This commit is contained in:
Daniel Roe 2021-11-02 12:01:44 +00:00 committed by GitHub
parent f010d0912b
commit eb67eb919e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

@ -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 ..

View File

@ -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'
@ -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)
})