-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
36 lines (35 loc) · 985 Bytes
/
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
const peerDepsExternal = require("rollup-plugin-peer-deps-external");
const babel = require("@rollup/plugin-babel");
const postcss = require("rollup-plugin-postcss");
const resolve = require("@rollup/plugin-node-resolve").default; // .default might be needed for ESM exports
const commonjs = require("@rollup/plugin-commonjs");
const json = require("@rollup/plugin-json");
module.exports= {
input: "src/CopyContainer.jsx",
output: [
{
file: "src/rollup_output.js",
format: "cjs",
sourcemap: true
}
],
plugins: [
peerDepsExternal(),
postcss({
plugins: [
require("tailwindcss"),
require("autoprefixer")
],
extract: false, // Inline styles to the JS file
modules: false, // Use CSS modules
use: ["sass"] // Use Sass as preprocessor
}),
babel({
exclude: "node_modules/**",
presets: ["@babel/env", "@babel/preset-react"]
}),
resolve(),
commonjs(),
json()
]
};