From b535ac17766ca4ff38ca639893c641d02a9d5d3a Mon Sep 17 00:00:00 2001 From: BitDen Date: Tue, 14 Nov 2017 16:10:08 +0800 Subject: [PATCH] Trying do rebuild after changes in ./src --- package.json | 2 +- test/config/karma.conf.js | 5 ++++- webpack/config.js | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d467d8ef..74d0401d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "prod-build": "webpack --config webpack/config.js", "prod-test": "karma start test/config/karma.conf.js", "dev-build": "webpack --config webpack/config.js", - "dev-test": "karma start test/config/karma.conf.js", + "dev-test": "npm run dev-build && karma start test/config/karma.conf.js", "test": "concurrently --kill-others --raw \"npm run dev-build\" \"npm run dev-test\"", "build": "npm run prod-build && npm run prod-test" }, diff --git a/test/config/karma.conf.js b/test/config/karma.conf.js index fd2cfc41..3c2f9a7e 100644 --- a/test/config/karma.conf.js +++ b/test/config/karma.conf.js @@ -3,6 +3,9 @@ const firefox = 'Firefox'; const ie = 'IE'; const ENV = (process.env.npm_lifecycle_event.indexOf('dev') === 0) ? 'development' : 'production'; +let webpackConfig = require('../../webpack/config.js'); +// webpackConfig.entry = null; +webpackConfig.plugins = []; module.exports = function (config) { config.set({ @@ -24,7 +27,7 @@ module.exports = function (config) { '../../src/*.js': ['webpack'] }, - webpack: {}, + webpack: webpackConfig, exclude: [], diff --git a/webpack/config.js b/webpack/config.js index 822263e4..9006ff9e 100644 --- a/webpack/config.js +++ b/webpack/config.js @@ -86,7 +86,7 @@ module.exports = { options: { presets: ['es2015'] } - }, + }, { enforce: 'pre', test: /\.js$/, @@ -106,5 +106,6 @@ module.exports = { new webpack.BannerPlugin(getBanner(configEnv.compressing)) ], - watch: configEnv.watch + // watch: configEnv.watch + watch: false };