({ entryName, entry, outDir, filename, alias = {} })
| 86 | } |
| 87 | |
| 88 | function createBundleConfig({ entryName, entry, outDir, filename, alias = {} }) { |
| 89 | return { |
| 90 | root: dashboardRoot, |
| 91 | mode: "production", |
| 92 | source: { |
| 93 | entry: { [entryName]: rsbuildEntry(entry) }, |
| 94 | define: { "process.env.NODE_ENV": JSON.stringify("production") }, |
| 95 | }, |
| 96 | resolve: { |
| 97 | alias, |
| 98 | extensions: EXTENSIONS, |
| 99 | }, |
| 100 | output: { |
| 101 | distPath: { root: outDir, js: "." }, |
| 102 | filename: { js: filename }, |
| 103 | filenameHash: false, |
| 104 | cleanDistPath: true, |
| 105 | legalComments: "none", |
| 106 | minify: true, |
| 107 | }, |
| 108 | performance: { |
| 109 | chunkSplit: { strategy: "all-in-one" }, |
| 110 | printFileSize: false, |
| 111 | }, |
| 112 | plugins: [pluginReact(), pluginTypeCheck()], |
| 113 | tools: { |
| 114 | rspack(config) { |
| 115 | applySingleBundleOutput(config); |
| 116 | }, |
| 117 | }, |
| 118 | }; |
| 119 | } |
| 120 | |
| 121 | export function createShellBuildConfig() { |
| 122 | return createBundleConfig({ |
no test coverage detected