Skip to content

Commit

Permalink
Merge pull request #151 from JochenDiekenbrock/master
Browse files Browse the repository at this point in the history
update to Webpack 2
  • Loading branch information
gf3 authored Feb 13, 2017
2 parents 4107b9b + 8121ec1 commit 9b23e70
Show file tree
Hide file tree
Showing 3 changed files with 580 additions and 236 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"karma-webpack": "^2.0.2",
"mocha": "^2.5.3",
"moment": "^2.17.1",
"webpack": "^1.13.3"
"webpack": "^2.2.1"
},
"peerDependencies": {
"moment": ">= 2"
Expand Down
23 changes: 13 additions & 10 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,43 @@ module.exports = {
moment: 'moment'
},
module: {
loaders: [
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
options: {
cacheDirectory: '/tmp/',
plugins: ['transform-flow-strip-types'],
presets: ['es2015', 'stage-0']
}
}, {
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
enforce: "pre"
}
],
preLoaders: [
{ test: /\.js$/, loader: 'eslint-loader', exclude: /node_modules/ }
]
},
resolve: {
root: [
modules: [
path.resolve(__dirname, './src'),
path.resolve(__dirname, './node_modules')
]
},
resolveLoader: {
root: path.resolve(__dirname, './node_modules')
modules: [
path.resolve(__dirname, './node_modules')
]
},
output: {
filename: 'moment-range.js',
hash: false,
library: 'moment-range',
libraryTarget: 'umd',
path: './dist/',
umdNamedDefine: true
},
plugins: [
new webpack.NoErrorsPlugin()
],
new webpack.NoEmitOnErrorsPlugin()
]
};
Loading

0 comments on commit 9b23e70

Please sign in to comment.