1
0
Fork 0

sparkles: Added CSS prefix to prevent clashes with frontend

This commit is contained in:
Joost De Cock 2019-01-05 16:50:23 +01:00
parent 94db122c86
commit 9e1fe464b6
20 changed files with 1671 additions and 140 deletions

View file

@ -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 */`