-
Notifications
You must be signed in to change notification settings - Fork 19
/
rollup.config.js
42 lines (41 loc) · 1.36 KB
/
rollup.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
36
37
38
39
40
41
42
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";
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: require("node-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(),
commonjs(),
injectProcessEnv({
NODE_ENV: "production",
}),
analyze({ summaryOnly: true }),
],
};