-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
37 lines (37 loc) · 925 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
31
32
33
34
35
36
37
import vue from 'rollup-plugin-vue'
import commonjs from 'rollup-plugin-commonjs'
import postcss from 'rollup-plugin-postcss'
const plugins = [
commonjs(),
vue(),
postcss({
// Extract CSS to the same location where JS file is generated but with .css extension.
extract: true,
// Use named exports alongside default export.
namedExports: true,
// Minimize CSS, boolean or options for cssnano.
minimize: true,
// Enable sourceMap.
sourceMap: true,
// This plugin will process files ending with these extensions and the extensions supported by custom loaders.
extensions: ['.css']
})
]
export default [
{
input: './packages/index.js',
output: {
format: 'esm',
file: 'dist/library.js'
},
plugins
},
{
input: './packages/index.js',
output: {
format: 'esm',
file: 'example/src/fiori-design-vue/index.js'
},
plugins
}
]