|
пре 2 месеци | |
---|---|---|
.husky | пре 3 месеци | |
mock | пре 3 месеци | |
src | пре 2 месеци | |
test | пре 3 месеци | |
types | пре 3 месеци | |
.commitlintrc.js | пре 3 месеци | |
.env.development | пре 3 месеци | |
.env.production | пре 3 месеци | |
.eslintignore | пре 3 месеци | |
.eslintrc-auto-import.json | пре 3 месеци | |
.eslintrc.js | пре 3 месеци | |
.gitignore | пре 3 месеци | |
.prettierignore | пре 3 месеци | |
.prettierrc.js | пре 3 месеци | |
.stylelintignore | пре 3 месеци | |
.stylelintrc.js | пре 3 месеци | |
README.md | пре 3 месеци | |
index.html | пре 3 месеци | |
package-lock.json | пре 3 месеци | |
package.json | пре 3 месеци | |
pnpm-lock.yaml | пре 3 месеци | |
stats.html | пре 3 месеци | |
tsconfig.json | пре 3 месеци | |
vite.config.ts | пре 3 месеци | |
yarn.lock | пре 3 месеци |
rollup里面的配置 // html2canvas 只有极少数的页面使用了 所以要单独处理一下 第三方库分类打包 if (id.includes('html2canvas')) { return 'html2canvas'; }
// 打包入口文件 根目录下的 index.html // 也就是项目从哪个文件开始打包 input: { index: fileURLToPath(new URL('./index.html', import.meta.url)) }, // external: ['moment', 'video.js', 'jspdf', 'xlsx', 'echart'], // plugins: [visualizer({ open: true })], //globals treeshake: { preset: 'recommended', manualPureFunctions: ['console.log'] }, // experimentalLogSideEffects: true, output: { experimentalMinChunkSize: 20 * 1024 // manualChunks: (id: string) => { // html2canvas 只有极少数的页面使用了 所以要单独处理一下 第三方库分类打包 if (id.includes('html2canvas')) { return 'html2canvas'; } // if (id.includes('node_modules')) { // return 'vendor'; // } // return 'index'; // } } // experimentalLogSideEffects: true, treeshake: { preset: 'recommended', manualPureFunctions: ['console.log'] },