neo-cmp-cli 1.0.8 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-ts-custom-cmp-template",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "neo自定义组件模板(react&ts技术栈)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"自定义组件模板",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
48
|
"@types/react": "^16.9.11",
|
|
49
49
|
"@types/react-dom": "^16.9.15",
|
|
50
|
-
"neo-cmp-cli": "^1.0.
|
|
50
|
+
"neo-cmp-cli": "^1.0.10",
|
|
51
51
|
"husky": "^4.2.5",
|
|
52
52
|
"lint-staged": "^10.2.9",
|
|
53
53
|
"prettier": "^2.0.5"
|
package/src/utils/webpack.mf.js
CHANGED
|
@@ -33,15 +33,6 @@ const neoSharedDeps = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const MFPlugins = [
|
|
36
|
-
new ModuleFederationPlugin({
|
|
37
|
-
name: currentPackageJson.name,
|
|
38
|
-
remotes: {
|
|
39
|
-
// 通过 external-remotes-plugin 支持变量写法
|
|
40
|
-
neobase: 'neobase@[window.neoEntrys.neobase]',
|
|
41
|
-
neoreact: 'neoreact@[window.neoEntrys.neoreact]'
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
new ExternalTemplateRemotesPlugin(),
|
|
45
36
|
new webpack.NormalModuleReplacementPlugin(/(.*)/, (resource) => {
|
|
46
37
|
if (neoSharedDeps[resource.request]) {
|
|
47
38
|
// 使用 Neo 提供的其他依赖
|
|
@@ -51,7 +42,16 @@ const MFPlugins = [
|
|
|
51
42
|
// 使用 Neo 提供的 react 和 react-dom
|
|
52
43
|
resource.request = `neoreact/${resource.request}`;
|
|
53
44
|
}
|
|
54
|
-
})
|
|
45
|
+
}),
|
|
46
|
+
new ModuleFederationPlugin({
|
|
47
|
+
name: currentPackageJson.name,
|
|
48
|
+
remotes: {
|
|
49
|
+
// 通过 external-remotes-plugin 支持变量写法
|
|
50
|
+
neobase: 'neobase@[window.neoEntrys.neobase]',
|
|
51
|
+
neoreact: 'neoreact@[window.neoEntrys.neoreact]'
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
new ExternalTemplateRemotesPlugin(),
|
|
55
55
|
];
|
|
56
56
|
|
|
57
57
|
module.exports = {
|