-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
35 lines (33 loc) · 914 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
35
const getConfig = require("wprun");
const DEV = process.env.NODE_ENV === "development";
module.exports = getConfig(__dirname, {
copyPluginOptions: [
{ from: "*.ico", to: "./", context: "assets" },
{ from: "**/*", to: "assets", context: "assets" },
],
htmlPluginOptions: {
title: "Tunes",
description: "Tunes",
},
externalsPluginOptions: {
externals: [
{
module: "hyperhtml-element",
global: "HyperHTMLElement",
entry: DEV ? "min.js" : "https://unpkg.com/hyperhtml-element@3.1.0/min.js",
},
{
module: "mobx",
global: "mobx",
entry: DEV
? "lib/mobx.umd.min.js"
: "https://unpkg.com/mobx@5.5.2/lib/mobx.umd.min.js",
},
{
module: "classnames",
global: "classNames",
entry: DEV ? "index.js" : "https://unpkg.com/classnames@2.2.6/index.js",
},
],
},
});