Skip to content

Instantly share code, notes, and snippets.

@fakiolinho
Last active March 8, 2018 09:48
Show Gist options
  • Save fakiolinho/e3f16016712267568c0a537b4a93554c to your computer and use it in GitHub Desktop.
Save fakiolinho/e3f16016712267568c0a537b4a93554c to your computer and use it in GitHub Desktop.
const { resolve } = require('path');
module.exports = {
context: resolve(__dirname, '../'),
entry: ['babel-polyfill', './app/js/main.js'],
resolve: {
extensions: [
'*', '.js', '.jsx',
],
modules: [
resolve(__dirname, '../app'),
'node_modules',
],
},
output: {
filename: '[name]-[hash:6].js',
path: resolve(__dirname, '../build'),
publicPath: '/',
},
module: {
rules: [
...
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment