You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no problem before adding @vitejs/plugin-legacy.
I want the open the compiled file index.html directly in the dist directory, but it was blank page.
So I added @vitejs/plugin-legacy and made relevant configurations in vite.config.ts.
Then compile.
Or you can tell me how to configure it. Open the compiled file index.html directly to display the content.
step
yarn install
yarn build
error:
yarn run v1.22.22
warning package.json: No license field
$ vite build
plugin-legacy overrode 'build.target'. You should pass 'targets' as an option to this plugin with the list of legacy browsers to support instead.
vite v2.5.10 building for production...
✓ 91 modules transformed.
[vite:legacy-post-process] Cannot destructure property 'chunks' of 'undefined' as it is undefined.
error during build:
TypeError: Cannot destructure property 'chunks' of 'undefined' as it is undefined.
at Object.renderChunk (/Users/erica/Desktop/01前端/01项目/08goal-Vue3-wheel(暂时)/node_modules/@vitejs/plugin-legacy/dist/index.cjs:430:43)
at /Users/erica/Desktop/01前端/01项目/08goal-Vue3-wheel(暂时)/node_modules/rollup/dist/shared/rollup.js:22879:40
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
Describe the bug
step
error:
package.json
vite.config.ts
Reproduction
https://github.com/ericasun/problemhere
Steps to reproduce
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: