forked from shopware/meteor-component-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
46 lines (45 loc) · 982 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
38
39
40
41
42
43
44
45
46
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import typescript from "rollup-plugin-typescript2";
import vue from "rollup-plugin-vue";
import scss from 'rollup-plugin-scss';
import svg from 'rollup-plugin-svg-import';
import dynamicImportVars from '@rollup/plugin-dynamic-import-vars';
export default {
input: "src/index.ts",
external: [
'vue'
],
output: [
{
format: "cjs",
// file: packageJson.main,
dir: 'dist/common',
sourcemap: true,
exports: 'auto'
},
{
format: "esm",
// file: packageJson.module,
dir: 'dist/esm',
sourcemap: true
}
],
plugins: [
vue(),
commonjs(),
svg({
// process SVG to DOM Node or String. Default: false
stringify: true
}),
typescript(),
scss({
output: 'dist/style.css',
failOnError: true,
}),
dynamicImportVars({
// options
}),
resolve(),
]
};