-
Notifications
You must be signed in to change notification settings - Fork 19
/
rollup.config.mjs
49 lines (48 loc) · 1.52 KB
/
rollup.config.mjs
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
44
45
46
47
48
49
import svelte from "rollup-plugin-svelte";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import babel from "rollup-plugin-babel";
import analyze from "rollup-plugin-analyzer";
import injectProcessEnv from "rollup-plugin-inject-process-env";
import scss from "rollup-plugin-scss";
import sass from "node-sass";
import polyfill from "rollup-plugin-polyfill-node";
export default {
input: "js/main.js",
output: {
file: "js/bundle.js",
format: "iife",
},
// external: ["@popperjs/core"],
plugins: [
scss({
// Filename to write all styles to
output: "css/timemanager.css",
// A Sass (sass compatible) compiler to use
// - sass and node-sass packages are picked up automatically
// - you can use this option to specify custom package (e.g. a fork of one of them)
sass,
// Log filename and size of generated CSS files (default: true)
verbose: true,
// Add file/folder to be monitored in watch mode so that changes to these files will trigger rebuilds.
// Do not choose a directory where rollup output or dest is pointed to as this will cause an infinite loop
watch: "css/*.scss",
}),
svelte({
// Emit CSS as "files" for other plugins to process. default is true
emitCss: false,
}),
babel({ extensions: [".js", ".svelte"] }),
resolve({
browser: true,
exportConditions: ["svelte"],
extensions: [".js", ".svelte"],
}),
commonjs(),
polyfill(),
injectProcessEnv({
NODE_ENV: "production",
}),
analyze({ summaryOnly: true }),
],
};