forked from pwa-builder/PWABuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.dev.js
40 lines (39 loc) · 1.1 KB
/
rollup.config.dev.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
import resolve from "@rollup/plugin-node-resolve";
import html from "@open-wc/rollup-plugin-html";
import copy from "rollup-plugin-copy";
import replace from "@rollup/plugin-replace";
import typescript from "@rollup/plugin-typescript";
import litcss from "rollup-plugin-lit-css";
import json from '@rollup/plugin-json';
export default {
input: "index.html",
output: {
dir: "build",
format: "es",
sourcemap: true
},
plugins: [
resolve(),
html(),
json(),
typescript({
tsconfig: "tsconfig.dev.json",
resolveJsonModule: true
}),
litcss(),
replace({
"window.ENV": JSON.stringify(process.env.NODE_ENV || "development"),
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || "development"),
}),
copy({
targets: [
{ src: "assets/**/*", dest: "build/assets/" },
{ src: "styles/global.css", dest: "build/styles/" },
{ src: "manifest.json", dest: "build/" },
{ src: "workers/**/*", dest: "build/workers/" },
{ src: "fast-components.min.js", dest: "build/" }
],
copyOnce: true
}),
],
};