-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.vendor.js
42 lines (41 loc) · 1.13 KB
/
webpack.config.vendor.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
35
36
37
38
39
40
41
42
var path = require("path");
var webpack = require("webpack");
module.exports = {
stats: {
modules: false
},
resolve: {
extensions: [".js"]
},
entry: {
vendor: [
"bootstrap",
"history",
"react",
"react-dom",
"react-router-dom",
"react-router",
"jquery",
]
},
output: {
path: path.join(__dirname, "public", "dist"),
publicPath: "/public/dist",
filename: "[name].js",
library: "[name]_[hash]"
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
}), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable)
new webpack.NormalModuleReplacementPlugin(
/\/iconv-loader$/,
require.resolve("node-noop")
), // Workaround for https://github.com/andris9/encoding/issues/16
new webpack.DllPlugin({
path: path.join(__dirname, "public", "dist", "[name]-manifest.json"),
name: "[name]_[hash]"
})
]
};