Skip to content

Instantly share code, notes, and snippets.

@awareness481
Created July 31, 2018 08:05
Show Gist options
  • Save awareness481/b52058e6e49e9724325013c042c79e25 to your computer and use it in GitHub Desktop.
Save awareness481/b52058e6e49e9724325013c042c79e25 to your computer and use it in GitHub Desktop.
webpack.prod.js
const path = require('path');
module.exports = {
entry: './src/app.js',
target: 'web',
node: {
fs: 'empty'
},
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
publicPath: '/public/'
},
module: {
rules: [{
test: /\.js$/,
include: path.join(__dirname, 'src'),
exclude: [ /(node_modules|bower_components)/,
'./src/server.js',
'./src/srv-compiled.js'
],
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment