2019-04-28 03:38:30 -07:00
|
|
|
const path = require('path');
|
2019-05-24 21:28:06 -07:00
|
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
2019-04-28 03:38:30 -07:00
|
|
|
|
|
|
|
module.exports = {
|
2019-05-24 21:28:06 -07:00
|
|
|
context: path.resolve(__dirname, 'src'),
|
2019-05-22 12:18:17 -07:00
|
|
|
entry: './bundle.js',
|
2019-04-28 03:38:30 -07:00
|
|
|
output: {
|
2019-05-22 12:18:17 -07:00
|
|
|
filename: 'bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
2019-09-11 02:35:41 -07:00
|
|
|
libraryTarget: 'amd-require'
|
2019-04-28 03:38:30 -07:00
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
modules: [
|
2019-05-22 12:18:17 -07:00
|
|
|
path.resolve(__dirname, 'node_modules')
|
2019-04-28 03:38:30 -07:00
|
|
|
]
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2019-05-22 12:18:17 -07:00
|
|
|
test: /\.css$/i,
|
2019-04-28 03:38:30 -07:00
|
|
|
use: ['style-loader', 'css-loader']
|
2019-05-22 12:18:17 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif)$/i,
|
|
|
|
use: ['file-loader']
|
2019-04-28 03:38:30 -07:00
|
|
|
}
|
|
|
|
]
|
2019-05-24 21:28:06 -07:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new CopyPlugin([{
|
|
|
|
from: '**/*',
|
|
|
|
to: '.'
|
|
|
|
}])
|
|
|
|
]
|
2019-05-22 12:18:17 -07:00
|
|
|
};
|