Skip to content

Instantly share code, notes, and snippets.

@awestbro
Created March 12, 2017 21:26
Show Gist options
  • Save awestbro/640bfc764d86b13f55e18c65376dfbad to your computer and use it in GitHub Desktop.
Save awestbro/640bfc764d86b13f55e18c65376dfbad to your computer and use it in GitHub Desktop.
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: ['./web/static/js/app.js'],
output: {
path: './priv/static/dist',
filename: 'app.js',
},
plugins: [
new CopyWebpackPlugin([{ from: './web/static/assets/', to: '../' }]),
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['env'],
},
},
],
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment