sparkles: Added CSS prefix to prevent clashes with frontend
This commit is contained in:
parent
94db122c86
commit
9e1fe464b6
20 changed files with 1671 additions and 140 deletions
|
@ -2,7 +2,9 @@ import { terser } from "rollup-plugin-terser";
|
|||
import babel from "rollup-plugin-babel";
|
||||
import resolve from "rollup-plugin-node-resolve";
|
||||
import json from "rollup-plugin-json";
|
||||
import sass from "rollup-plugin-sass";
|
||||
import { version, name, description, author, license } from "./package.json";
|
||||
import fs from "fs";
|
||||
|
||||
export default {
|
||||
input: "src/index.js",
|
||||
|
@ -14,6 +16,14 @@ export default {
|
|||
babel({
|
||||
exclude: "node_modules/**"
|
||||
}),
|
||||
sass({
|
||||
output(styles, styleNodes) {
|
||||
fs.writeFileSync(
|
||||
"./src/bundle.css.js",
|
||||
"export default `" + styles + "`;"
|
||||
);
|
||||
}
|
||||
}),
|
||||
terser({
|
||||
output: {
|
||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue