Skip to content

Commit

Permalink
Cleans webpack config files
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitvallon committed Oct 14, 2015
1 parent b3bb14f commit 9850e3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 50 deletions.
36 changes: 7 additions & 29 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,32 @@
/*
* Webpack development server configuration
*
* This file is set up for serving the webpack-dev-server, which will watch for changes and recompile as required if
* the subfolder /webpack-dev-server/ is visited. Visiting the root will not automatically reload.
*/

'use strict';

var webpack = require('webpack');

module.exports = {

output: {
filename: 'main.js',
publicPath: '/assets/'
},

cache: true,
debug: true,
devtool: false,
entry: [
'webpack/hot/only-dev-server',
'./specificWeb/main.js'
],

stats: {
colors: true,
reasons: true
},

resolve: {
extensions: ['', '.js'],
alias: {
'styles': __dirname + '/styles',
'mixins': __dirname + '/src/mixins',
'components': __dirname + '/components',
'stores': __dirname + '/src/stores/',
'actions': __dirname + '/src/actions/'
}
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
preLoaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'jsxhint'
}],
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
Expand All @@ -57,11 +41,5 @@ module.exports = {
test: /\.(png|jpg)$/,
loader: 'url-loader?limit=8192'
}]
},

plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]

}
};
21 changes: 0 additions & 21 deletions webpack.dist.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
var webpack = require('webpack');

module.exports = {

output: {
publicPath: '/assets/',
path: 'dist/assets/',
filename: 'main.js'
},

debug: false,
devtool: false,
entry: './specificWeb/main.js',
Expand All @@ -24,32 +22,13 @@ module.exports = {
colors: true,
reasons: false
},

plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.AggressiveMergingPlugin()
],

resolve: {
extensions: ['', '.js'],
alias: {
'styles': __dirname + '/styles',
'mixins': __dirname + '/src/mixins',
'components': __dirname + '/components',
'stores': __dirname + '/src/stores/',
'actions': __dirname + '/src/actions/'
}
},

module: {
preLoaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'jsxhint'
}],

loaders: [{
test: /\.js$/,
exclude: /node_modules/,
Expand Down

0 comments on commit 9850e3d

Please sign in to comment.