Skip to content

chore: general housekeeping #4001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 3 additions & 7 deletions basic-host-remote/app1/modern.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
import appTools, { defineConfig } from '@modern-js/app-tools';
import {ModuleFederationPlugin} from "@module-federation/enhanced"
import { ModuleFederationPlugin } from '@module-federation/enhanced/webpack';

// https://modernjs.dev/en/configure/app/usage
export default defineConfig({
server: {
port: 3001,
},
// dev: {
// // set publicPath
// assetPrefix: 'http://localhost:3001/',
// },
runtime: {
router: true,
},
source: {
// automatically generated asynchronous boundary via Dynamic Import, allowing the page code to consume remote modules generated by the module federation.
// Automatically generated asynchronous boundary via Dynamic Import, allowing the page code to consume remote modules generated by the module federation.
enableAsyncEntry: true,
},
tools: {
webpack: (config, { webpack, appendPlugins }) => {
webpack: (config, { appendPlugins }) => {
delete config.optimization.splitChunks;
config.output.publicPath = 'auto';

Expand Down
10 changes: 3 additions & 7 deletions basic-host-remote/app2/modern.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import appTools, { defineConfig } from '@modern-js/app-tools'
import {ModuleFederationPlugin} from "@module-federation/enhanced"
import appTools, { defineConfig } from '@modern-js/app-tools';
import { ModuleFederationPlugin } from '@module-federation/enhanced';

// https://modernjs.dev/en/configure/app/usage
export default defineConfig({
server: {
port: 3002,
},
dev: {
// set publicPath
// assetPrefix: 'auto',
},
runtime: {
router: true,
},
Expand All @@ -18,7 +14,7 @@ export default defineConfig({
enableAsyncEntry: true,
},
tools: {
webpack: (config, { webpack, appendPlugins }) => {
webpack: (config, { appendPlugins }) => {
delete config.optimization.splitChunks;
config.output.publicPath = 'auto';

Expand Down
Loading