constant.ts 916 B

1234567891011121314151617181920212223242526272829303132333435
  1. export const OUTPUT_DIR = 'dist'
  2. // monaco-editor 路径
  3. export const prefix = `monaco-editor/esm/vs`
  4. // chunk 警告大小
  5. export const chunkSizeWarningLimit = 2000
  6. // 禁用 brotli 压缩大小报告
  7. export const brotliSize = false
  8. // 分包
  9. export const rollupOptions = {
  10. output: {
  11. chunkFileNames: 'static/js/[name]-[hash].js',
  12. entryFileNames: 'static/js/[name]-[hash].js',
  13. assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
  14. manualChunks: {
  15. jsonWorker: [`${prefix}/language/json/json.worker`],
  16. cssWorker: [`${prefix}/language/css/css.worker`],
  17. htmlWorker: [`${prefix}/language/html/html.worker`],
  18. tsWorker: [`${prefix}/language/typescript/ts.worker`],
  19. editorWorker: [`${prefix}/editor/editor.worker`]
  20. }
  21. }
  22. }
  23. // 去除开发代码
  24. export const terserOptions = {
  25. compress: {
  26. keep_infinity: true,
  27. drop_console: true,
  28. drop_debugger: true
  29. }
  30. }