From 6442075d717feacfc876375c05b701ac96c01a9e Mon Sep 17 00:00:00 2001 From: ColCh Date: Sun, 2 Nov 2014 16:03:43 +0300 Subject: [PATCH] Move webpack configs to tempates --- app/index.js | 2 ++ templates/common/{root/webpack.config.js => _webpack.config.js} | 1 - .../{root/webpack.dist.config.js => _webpack.dist.config.js} | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename templates/common/{root/webpack.config.js => _webpack.config.js} (99%) rename templates/common/{root/webpack.dist.config.js => _webpack.dist.config.js} (100%) diff --git a/app/index.js b/app/index.js index 455071b..edde6ea 100644 --- a/app/index.js +++ b/app/index.js @@ -94,6 +94,8 @@ ReactWebpackGenerator.prototype.createIndexHtml = function createIndexHtml() { ReactWebpackGenerator.prototype.packageFiles = function () { this.reactRouter = this.env.options.reactRouter; this.template('../../templates/common/_package.json', 'package.json'); + this.template('../../templates/common/_webpack.config.js', 'webpack.config.js'); + this.template('../../templates/common/_webpack.dist.config.js', 'webpack.dist.config.js'); this.copy('../../templates/common/Gruntfile.js', 'Gruntfile.js'); this.copy('../../templates/common/gitignore', '.gitignore'); }; diff --git a/templates/common/root/webpack.config.js b/templates/common/_webpack.config.js similarity index 99% rename from templates/common/root/webpack.config.js rename to templates/common/_webpack.config.js index 4c69e48..d66ea2b 100644 --- a/templates/common/root/webpack.config.js +++ b/templates/common/_webpack.config.js @@ -38,7 +38,6 @@ module.exports = { exclude: 'node_modules', loader: 'jshint' }], - loaders: [{ test: /\.jsx$/, loader: 'react-hot!jsx-loader?harmony' diff --git a/templates/common/root/webpack.dist.config.js b/templates/common/_webpack.dist.config.js similarity index 100% rename from templates/common/root/webpack.dist.config.js rename to templates/common/_webpack.dist.config.js