Created
March 25, 2017 14:52
-
-
Save daniellizik/46bfc8a787908272ca3c5a60c04490a8 to your computer and use it in GitHub Desktop.
webpack2 config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack') | |
module.exports = { | |
devtool: 'inline-source-map', | |
entry: `${__dirname}/../src/index.js`, | |
output: { | |
publicPath: '/', | |
filename: 'bundle.js' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$|\.jsx$/, | |
exclude: /node_modules/, | |
use: ['babel-loader'] | |
}, | |
{ | |
test: /\.json$/, | |
use: ['json-loader'] | |
}, | |
{ | |
test: /\.html$/, | |
use: ['html-loader'] | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.NoErrorsPlugin(), | |
new webpack.DefinePlugin({ | |
'process.env': { NODE_ENV: JSON.stringify(process.env.NODE_ENV) } | |
}) | |
], | |
target: 'web' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment