must addincludeoption. see(https://github.com/CaptainLiao/vite-plugin-webpackchunkname/issues/18) eg: importComponentsfrom'unplugin-vue-components/vite';...plugins:[Components({// other paramsinclude:[/\.vue$/,/\.vue\?/]}),],... ...
Add it tovite.config.ts // vite.config.tsimport{manualChunksPlugin}from'vite-plugin-webpackchunkname'// Other dependencies...exportdefaultdefineConfig({plugins:[manualChunksPlugin(),]}) then addwebpackChunkNamecomments to the import: import(/* webpackChunkName: "detail" */"@/detail/somepage...
"name": "vite-plugin-webpackchunkname", "version": "1.0.3", "description": "A webpackChunkName plugin for Vite.", "main": "dist/vite-plugin-webpackchunkname.js", "module": "dist/vite-plugin-webpackchunkname.mjs", "types": "dist/index.d.ts", "files": [ "dist" ], "scripts...
When I used manualChunksPlugin, I found that there was a problem with the css packaging order. I have put import './styles/app-main.scss'; in the first line in main.ts. In the final css packaging product, this part of css should be at the first. But that's not actually the case...
vite-plugin-webpackchunkname package.json onmaster User selector All users DatepickerAll time Commit History Commits on Jun 26, 2024 fix(#30): 使用__作为文件分隔符 CaptainLiaocommittedJun 26, 2024 2cca466 fix(#30): 使用 ~ 作为文件分隔符 CaptainLiaocommittedJun 26, 2024 ae0df08 Comm...
npm install --save-dev vite-plugin-webpackchunknameBasic usageAdd it to vite.config.ts// vite.config.ts import { manualChunksPlugin } from 'vite-plugin-webpackchunkname' // Other dependencies... export default defineConfig({ plugins: [ manualChunksPlugin(), ] })...