3
0

rollup.js 442 B

12345678910111213
  1. export default {
  2. output: {
  3. //解决打包时Some chunks are larger警告
  4. manualChunks(id) {
  5. if (id.includes('node_modules')) {
  6. return id.toString().split('node_modules/')[1].split('/')[0].toString();
  7. }
  8. },
  9. chunkFileNames: 'site/js/[name]-[hash].js',
  10. entryFileNames: 'site/js/[name]-[hash].js',
  11. assetFileNames: 'site/[ext]/[name]-[hash].[ext]',
  12. }
  13. }