nuxt-vite-legacy returns unexpectedly
Closed this issue · 3 comments
The console displays:
WARN nuxt-vite-legacy didn't find legacy-polyfills-legacy chunk. Legacy build will not work.
But I only use vite-plugin-legacy
to generate modern polyfills in my project with renderLegacyChunks: false
in config. The plugin should still mutate the reference in the manifest instead of aborting.
Can you please elaborate? Which reference should be mutated and how?
Firstly I don't understand why renderLegacyChunks
is omited.
nuxt-vite-legacy/src/module.ts
Line 4 in b982c7f
Some users (like me) generate polyfills via vite-plugin-legacy
for modern but old browsers (like chrome 69).
The config is generally like the following one:
legacy({
modernPolyfills: true,
renderLegacyChunks: false,
}),
With the above config, manifest key of polyfills is vite/legacy-polyfills
, instead of vite/legacy-polyfills-legacy
in source code:
nuxt-vite-legacy/src/module.ts
Line 52 in b982c7f
'vite/legacy-polyfills':
{ resourceType: 'script',
module: true,
prefetch: true,
preload: true,
file: 'polyfills.b7972713.js',
isEntry: true,
src: 'vite/legacy-polyfills' } }
Fair point, this use case didn't occur to me. This was addressed in version 1.1.0.