@ecoding/base.build 0.0.20 → 0.0.22

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.
@@ -0,0 +1,25 @@
1
+ const { rootPath } = require("./z-helpers/paths");
2
+ const webpack = require("webpack");
3
+ const { CleanWebpackPlugin } = require("clean-webpack-plugin");
4
+
5
+ module.exports = {
6
+ entry: {
7
+ dll: ["react", "react-dom", "react-helmet", "react-router-dom", "react-redux", "redux", "redux-thunk", "hoist-non-react-statics", "axios"]
8
+ //other:['a','b','c']
9
+ },
10
+ mode: "production",
11
+ output: {
12
+ // 输出出口指定
13
+ filename: "[name]_[fullhash].js", // name就是jquery
14
+ path: rootPath("dll"), // 打包到dll目录下
15
+ library: "[name]_[fullhash]" // 打包的库里面向外暴露出去的内容叫什么名字
16
+ },
17
+ plugins: [
18
+ new CleanWebpackPlugin(),
19
+ // 打包生成一个manifest.json --> 提供jquery的映射关系(告诉webpack:jquery之后不需要再打包和暴露内容的名称)
20
+ new webpack.DllPlugin({
21
+ name: "[name]_[fullhash]", // 映射库的暴露的内容名称
22
+ path: rootPath("dll/manifest_[name]_[fullhash].json") // 输出文件路径
23
+ })
24
+ ]
25
+ };
@@ -4,7 +4,7 @@ const { CleanWebpackPlugin } = require("clean-webpack-plugin");
4
4
 
5
5
  module.exports = {
6
6
  entry: {
7
- dll: ["react", "react-dom", "react-router-dom", "react-redux", "redux", "redux-thunk", "hoist-non-react-statics", "axios"]
7
+ dll: ["react", "react-dom", "react-helmet", "react-router-dom", "hoist-non-react-statics", "axios"]
8
8
  //other:['a','b','c']
9
9
  },
10
10
  mode: "production",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/base.build",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "tpl building",
5
5
  "author": "cxc",
6
6
  "license": "MIT",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "2eccdb818bb0967cf66224859b97fdd77ff343ca"
56
+ "gitHead": "c58167b6a4f2cbbd0a21c9b290746fc12ac5b05f"
57
57
  }