Skip to content

Commit fa11a07

Browse files
committed
fix: webpack-tool proxy
1 parent b5bc5d3 commit fa11a07

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ exports.getDllWebpackConfig = (config = {}, option = {}) => {
4444
return exports.WebpackBuilder.getDllWebpackConfig(config);
4545
};
4646

47-
exports.build = (webpackConfig, option, callback) => {
48-
return new WebpackTool().build(webpackConfig, option, callback);
47+
exports.build = (webpackConfig, config, callback) => {
48+
return new WebpackTool(config).build(webpackConfig, config, callback);
4949
};
5050

51-
exports.server = (webpackConfig, option, callback) => {
52-
return new WebpackTool().server(webpackConfig, option, callback);
51+
exports.server = (webpackConfig, config, callback) => {
52+
return new WebpackTool(config).server(webpackConfig, config, callback);
5353
};

lib/builder.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ exports.getDllWebpackConfig = (config, option = {}) => {
9999
const host = config.host;
100100
const configLoaders = config.loaders || {};
101101
const configPlugins = config.plugins || {};
102+
const optimization = config.optimization;
102103
const loaders = {};
103104
const plugins = {};
104105
const cli = utils.isObject(config.cli) ? config.cli : {};
@@ -115,7 +116,24 @@ exports.getDllWebpackConfig = (config, option = {}) => {
115116
}
116117
}
117118
dllArray.forEach(item => {
118-
const builderConfig = Object.assign({}, dllConfig, { host, node, compile, prefix, entry: {}, dll: item, publicPath, buildPath, alias, externals, resolveLoader, install, cdn, loaders, plugins }, item.webpackConfig);
119+
const builderConfig = Object.assign({}, dllConfig, {
120+
host,
121+
node,
122+
compile,
123+
prefix,
124+
entry: {},
125+
dll: item,
126+
publicPath,
127+
buildPath,
128+
alias,
129+
externals,
130+
resolveLoader,
131+
install,
132+
cdn,
133+
loaders,
134+
plugins,
135+
optimization
136+
}, item.webpackConfig);
119137
if (option.onlyView || cli.dll || utils.checkDllUpdate(config, item)) {
120138
dllWebpackConfig.push(new WebpackDllBuilder(builderConfig).create());
121139
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "easywebpack",
3-
"version": "4.10.0-rc.2",
3+
"version": "4.10.0-rc.3",
44
"description": "基于 Webpack 的前端构建工程化解决方案",
55
"keywords": [
66
"webpack",
@@ -59,7 +59,7 @@
5959
"webpack-hot-middleware": "^2.13.2",
6060
"webpack-manifest-resource-plugin": "^4.0.0",
6161
"webpack-node-externals": "^1.6.0",
62-
"webpack-tool": "^4.2.0"
62+
"webpack-tool": "next"
6363
},
6464
"devDependencies": {
6565
"chai": "^4.0.0",

0 commit comments

Comments
 (0)