Skip to content

Commit f732821

Browse files
committed
优化调试配置文件
1 parent e52619d commit f732821

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build/server.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ const product = process.argv[2];
1010
const app = module.exports = express();
1111
if (product) {
1212
const config = require(`./webpack.config.${product}.js`);
13+
const configBase = require(`./webpack.config.base.js`);
1314
const entry = [`./src/${product}/index.js`];
15+
const filename= product === 'classic' ? `iclient-classic` : `iclient9-${product}`;
16+
config.output.filename = `${filename}-es6.min.js`
1417
if (['leaflet', 'openlayers'].includes(product)) {
1518
entry.push(`./src/${product}/css/index.js`);
19+
config.plugins = configBase.plugins(product, `${filename}.min`);
1620
}
1721
config.mode = 'development';
1822
config.entry = entry;
19-
config.output.filename = product === 'classic' ? `iclient-classic-es6.js` : `iclient9-${product}-es6.js`
2023
config.devtool = 'cheap-module-eval-source-map';
2124

2225

@@ -55,5 +58,5 @@ app.use("/en/dist", express.static('dist'), serveIndex('dist'));
5558
app.use("/en/build", express.static('build'), serveIndex('build'));
5659
app.use("/en", express.static('web/en'), serveIndex('web/en'));
5760
if (!product) {
58-
open(`http://localhost:9999/examples/leaflet`);
61+
open(`http://localhost:9999`);
5962
}

0 commit comments

Comments
 (0)