1
0
Fork 0

fix(components): Add sass plugin to rollup

This commit is contained in:
Joost De Cock 2021-05-23 11:56:50 +02:00
parent 804239509b
commit 4a72b581d8
2 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,7 @@
import babel from '@rollup/plugin-babel' import babel from '@rollup/plugin-babel'
import resolve from '@rollup/plugin-node-resolve' import resolve from '@rollup/plugin-node-resolve'
import json from '@rollup/plugin-json' import json from '@rollup/plugin-json'
import sass from 'rollup-plugin-sass';
import { terser } from 'rollup-plugin-terser' import { terser } from 'rollup-plugin-terser'
import peerDepsExternal from 'rollup-plugin-peer-deps-external' import peerDepsExternal from 'rollup-plugin-peer-deps-external'
import { name, version, description, author, license } from './package.json' import { name, version, description, author, license } from './package.json'
@ -23,18 +24,19 @@ const createConfig = (component, module) => {
peerDepsExternal(), peerDepsExternal(),
resolve({ modulesOnly: true }), resolve({ modulesOnly: true }),
json(), json(),
//terser({ sass(),
// output: { terser({
// preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */` output: {
// } preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
//}) }
})
] ]
} }
} }
const config = [] const config = []
// When developing, you can use this to only rebuild the components you're working on // When developing, you can use this to only rebuild the components you're working on
let dev = true let dev = false
let only = ['Workbench'] let only = ['Workbench']
for (let component of components) { for (let component of components) {
if (!dev || only.indexOf(component) !== -1) config.push(createConfig(component, false)) if (!dev || only.indexOf(component) !== -1) config.push(createConfig(component, false))

View file

@ -1,4 +1,3 @@
div.workbench.theme-wrapper { div.workbench.theme-wrapper {
> div > header { > div > header {
a.navlink { a.navlink {