Skip to content

Instantly share code, notes, and snippets.

@lmartim
Last active October 1, 2021 02:26
Show Gist options
  • Save lmartim/2d2927b2ab57743b724cc45f10798b8e to your computer and use it in GitHub Desktop.
Save lmartim/2d2927b2ab57743b724cc45f10798b8e to your computer and use it in GitHub Desktop.
The rollup config for building the component library.
import vue from 'rollup-plugin-vue'
import { terser } from 'rollup-plugin-terser'
import postcss from 'rollup-plugin-postcss'
module.exports = [
{
input: 'src/index.js',
output: [
{
sourcemap: true,
file: 'dist/index.js',
format: 'es'
}
],
inlineDynamicImports: true,
plugins: [
vue({
preprocessStyles: true,
preprocessOptions: {
scss: {
additionalData: `
@import 'dist/tokens/_variables.scss';
@import 'dist/styles/styles.scss';
`
}
}
}),
terser(),
postcss()
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment