Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
v1 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangHongEn committed Nov 14, 2023
1 parent 767ebd0 commit a1a9433
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/universal-module-federation-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "universal-module-federation-plugin",
"version": "2.0.1",
"version": "2.0.1-latest.1",
"description": "open module federation hook, support custom behavior, such as umd specification integration",
"main": "src/index.js",
"keywords": [
Expand Down
11 changes: 9 additions & 2 deletions packages/wpm-webpack/src/plugin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

const Port = require("webpack-port-collector")
const NpmFederation = require("npm-federation")

class WpmPlugin {
constructor(options) {
Expand All @@ -19,7 +20,13 @@ class WpmPlugin {
}, options)
}
apply(compiler) {

if (this.options.filename && this.options.name) {
new Port({
packageName: this.options.packageName,
filename: this.options.filename
}).apply(compiler)
}
new NpmFederation(this.options).apply(compiler)
}
}

Expand Down

0 comments on commit a1a9433

Please sign in to comment.