forked from ucdscenter/learning_machines_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
34 lines (32 loc) · 988 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
// assets.js
const Assets = require('./assets');
module.exports = {
entry: {
app: "./learningmachines/searcher/static/searcher/index.js",
},
output: {
path: __dirname + "/learningmachines/searcher/static/searcher/",
filename: "[name].bundle.js"
},
plugins: [
new CopyWebpackPlugin(
Assets.js.map(asset => {
return {
from: path.resolve(__dirname, `./node_modules/${asset}`),
to: path.resolve(__dirname, './learningmachines/searcher/static/searcher/js')
};
})
),
new CopyWebpackPlugin(
Assets.css.map(asset => {
return {
from: path.resolve(__dirname, `./node_modules/${asset}`),
to: path.resolve(__dirname, './learningmachines/searcher/static/searcher/css')
};
})
)
]
};