Skip to content

Commit

Permalink
Clean up webpack file syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
eightypop committed Nov 8, 2016
1 parent b72e2c0 commit 1b07af3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const webpack = require('webpack');
const path = require('path')
const webpack = require('webpack')

module.exports = {
entry: './src/index.js',
Expand All @@ -19,13 +19,13 @@ module.exports = {
new webpack.optimize.DedupePlugin()
],
resolve: {
extensions: ['', '.js'],
extensions: [ '', '.js' ],
root: path.resolve('src'),
modulesDirectory: 'node_modules'
},
module: {
loaders: [
{ test: [/\.js$/, /\.jsx$/], loader: 'babel', exclude: /node_modules/ },
{ test: [ /\.js$/, /\.jsx$/ ], loader: 'babel', exclude: /node_modules/ }
]
}
};
}
18 changes: 9 additions & 9 deletions webpack.config.samples.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const path = require('path');
const conf = require('./webpack.config');
delete conf.externals;
conf.entry = ['./samples/sandbox/src/index.jsx', 'webpack-dev-server/client?http://0.0.0.0:3333', 'webpack/hot/only-dev-server'];
const path = require('path')
const conf = require('./webpack.config')
delete conf.externals
conf.entry = [ './samples/sandbox/src/index.jsx', 'webpack-dev-server/client?http://0.0.0.0:3333', 'webpack/hot/only-dev-server' ]
conf.output = {
path: path.join(__dirname, 'serve'),
filename: 'sample.js'
};
conf.cache = true;
conf.debug = true;
conf.devtool = 'source-map';
}
conf.cache = true
conf.debug = true
conf.devtool = 'source-map'

module.exports = conf;
module.exports = conf

0 comments on commit 1b07af3

Please sign in to comment.