-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.base.js
More file actions
43 lines (41 loc) · 1 KB
/
webpack.base.js
File metadata and controls
43 lines (41 loc) · 1 KB
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
35
36
37
38
39
40
41
42
43
const path = require('path');
const config = {
// what file (and all of its dependencies to bundle)
entry: './ui-js-src/index.js',
// where to save the output
output: {
path: path.resolve(__dirname, 'public/js'),
filename: 'bundle.js',
},
// tell webpack how to handle each type of file
// we are only using webpack for js files
module: {
// allows us to write modern js
// babel converts it to old js that IE can run
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'entry'
},
],
],
},
},
},
],
},
// semantic ui expects a global jquery so we import jquery with a script tag
// this tells webpack to ignore jquery imports
externals: {
"jquery": "jQuery",
},
};
module.exports = config;