-
Notifications
You must be signed in to change notification settings - Fork 6
/
rollup.config.js
30 lines (27 loc) · 1003 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
import typescript from 'rollup-plugin-typescript2'
import VuePlugin from 'rollup-plugin-vue'
import copy from 'rollup-plugin-copy'
import pkg from './package.json'
const external = Object.keys(pkg.peerDependencies || {})
export default {
input: 'src/index.ts',
external,
output: {
dir: 'dist',
format: 'es',
},
plugins: [
typescript({
// We want `docs` to be built for Storybook, but no need to include those files in the library build
tsconfigOverride: { exclude: ['docs'] }
}),
VuePlugin({
css: false
}),
copy({
// For now, we only support usage of the styling as SCSS mixins, and thus only need to copy over the SCSS without compilation
// In the future, we could easily export compiled CSS by request, & perhaps allow for CSS vars replacing SCSS vars for customization in that case
targets: [{ src: 'src/styles', dest: './' }]
})
],
};