Add webpack copy plugin

This commit is contained in:
Bill Thornton 2019-05-25 00:28:06 -04:00
parent 61de82e7fe
commit 5734d5d07d
3 changed files with 139 additions and 5 deletions

View file

@ -1,7 +1,8 @@
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
context: __dirname + '/src',
context: path.resolve(__dirname, 'src'),
entry: './bundle.js',
output: {
filename: 'bundle.js',
@ -42,5 +43,12 @@ module.exports = {
use: ['file-loader']
}
]
}
},
plugins: [
new CopyPlugin([{
from: '**/*',
to: '.'
}])
]
};