diff --git a/modern.config.ts b/modern.config.ts index 2e7d486..ec5ab36 100644 --- a/modern.config.ts +++ b/modern.config.ts @@ -8,7 +8,7 @@ export default defineConfig({ state: true, }, dev: { - progressBar: false, + progressBar: { id: `🐹 ${process.env.APP_NAME}` }, host: process.env.XHOST, port: Number(process.env.XPORT ?? 8080), }, @@ -28,14 +28,17 @@ export default defineConfig({ 'process.env.MODERN_APP_ID': process.env.MODERN_APP_ID, 'process.env.MODERN_CALKEY': process.env.MODERN_CALKEY, }, + transformImport: [ + { + libraryName: '@nutui/nutui-react', + libraryDirectory: 'dist/esm', + style: 'css', + camelToDashComponentName: false, + }, + ], }, tools: { - rspack: (config, { prependPlugins, rspack }) => { - prependPlugins( - new rspack.ProgressPlugin({ - prefix: `🐹 ${process.env.APP_NAME}`, - }), - ); + rspack: config => { config.experiments = { ...config.experiments, asyncWebAssembly: true,