Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/module-federation/mf-host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@module-federation/rsbuild-plugin": "^0.0.2",
"@module-federation/rsbuild-plugin": "^0.6.13",
"@rsbuild/core": "~1.0.17",
"@rsbuild/plugin-react": "^1.0.5",
"@types/react": "^18.3.11",
Expand Down
4 changes: 2 additions & 2 deletions examples/module-federation/mf-react-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"serve": "pnpm build && http-server -p 3001 ./dist/ --cors"
},
"devDependencies": {
"@module-federation/enhanced": "^0.6.11",
"@module-federation/rsbuild-plugin": "^0.0.2",
"@module-federation/enhanced": "^0.6.13",
"@module-federation/rsbuild-plugin": "^0.6.13",
"@rsbuild/plugin-react": "^1.0.5",
"@rslib/core": "workspace:*",
"@types/react": "^18.3.11",
Expand Down
2 changes: 1 addition & 1 deletion examples/module-federation/mf-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@module-federation/rsbuild-plugin": "^0.0.2",
"@module-federation/rsbuild-plugin": "^0.6.13",
"@rsbuild/core": "~1.0.17",
"@rsbuild/plugin-react": "^1.0.5",
"@types/react": "^18.3.11",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ export function composeMinifyConfig(config: LibConfig): RsbuildConfig {
jsOptions: {
minimizerOptions: {
mangle: false,
minify: false,
// MF assets are loaded over the network, which means they will not be compressed by the project. Therefore, minifying them is necessary.
minify: format === 'mf',
compress: {
defaults: false,
unused: true,
Expand Down
165 changes: 86 additions & 79 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tests/integration/minify/config/rslib.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'node:path';
import { defineConfig } from '@rslib/core';
import { generateBundleEsmConfig } from 'test-helper';

Expand All @@ -9,7 +10,7 @@ export default defineConfig({
},
source: {
entry: {
index: './src/index.ts',
index: path.resolve(__dirname, '../__fixtures__/src/index.ts'),
},
},
});
3 changes: 2 additions & 1 deletion tests/integration/minify/default/rslib.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'node:path';
import { defineConfig } from '@rslib/core';
import { generateBundleEsmConfig } from 'test-helper';

Expand All @@ -8,7 +9,7 @@ export default defineConfig({
},
source: {
entry: {
index: './src/index.ts',
index: path.resolve(__dirname, '../__fixtures__/src/index.ts'),
},
},
});
Loading
Loading