@@ 1-49 (lines=49) @@ | ||
1 | import typescript from "rollup-plugin-typescript2"; |
|
2 | import del from "rollup-plugin-delete"; |
|
3 | import postcss from "rollup-plugin-postcss"; |
|
4 | import { terser } from "rollup-plugin-terser"; |
|
5 | ||
6 | import pkg from "../package.json"; |
|
7 | ||
8 | export default [ |
|
9 | { |
|
10 | input: "src/index.ts", |
|
11 | output: [ |
|
12 | { |
|
13 | file: "playground/src/modular-ui-preview/index.cjs", |
|
14 | format: "cjs", |
|
15 | banner: "require('./styles.css')", |
|
16 | plugins: [terser()], |
|
17 | }, |
|
18 | { |
|
19 | file: "playground/src/modular-ui-preview/index.mjs", |
|
20 | format: "esm", |
|
21 | banner: "/* eslint-disable */ import './styles.css';", |
|
22 | }, |
|
23 | { |
|
24 | file: pkg.main, |
|
25 | format: "cjs", |
|
26 | plugins: [terser()], |
|
27 | banner: "require('./styles.css')", |
|
28 | }, |
|
29 | { |
|
30 | file: pkg.module, |
|
31 | format: "esm", |
|
32 | banner: "/* eslint-disable */ import './styles.css';", |
|
33 | }, |
|
34 | ], |
|
35 | plugins: [ |
|
36 | del({ targets: ["dist/*", "playground/src/modular-ui-preview"] }), |
|
37 | postcss({ |
|
38 | plugins: [], |
|
39 | minimize: true, |
|
40 | extract: "styles.css", |
|
41 | }), |
|
42 | typescript({ |
|
43 | rollupCommonJSResolveHack: false, |
|
44 | clean: true, |
|
45 | }), |
|
46 | ], |
|
47 | external: Object.keys(pkg.peerDependencies || {}), |
|
48 | }, |
|
49 | ]; |
|
50 |
@@ 1-47 (lines=47) @@ | ||
1 | import typescript from "rollup-plugin-typescript2"; |
|
2 | import postcss from "rollup-plugin-postcss"; |
|
3 | import { terser } from "rollup-plugin-terser"; |
|
4 | ||
5 | import pkg from "../package.json"; |
|
6 | ||
7 | export default [ |
|
8 | { |
|
9 | input: "src/index.ts", |
|
10 | output: [ |
|
11 | { |
|
12 | file: "playground/src/modular-ui-preview/index.cjs", |
|
13 | format: "cjs", |
|
14 | banner: "require('./styles.css')", |
|
15 | plugins: [terser()], |
|
16 | }, |
|
17 | { |
|
18 | file: "playground/src/modular-ui-preview/index.mjs", |
|
19 | format: "esm", |
|
20 | banner: "/* eslint-disable */ import './styles.css';", |
|
21 | }, |
|
22 | { |
|
23 | file: pkg.main, |
|
24 | format: "cjs", |
|
25 | plugins: [terser()], |
|
26 | banner: "require('./styles.css')", |
|
27 | }, |
|
28 | { |
|
29 | file: pkg.module, |
|
30 | format: "esm", |
|
31 | banner: "/* eslint-disable */ import './styles.css';", |
|
32 | }, |
|
33 | ], |
|
34 | plugins: [ |
|
35 | postcss({ |
|
36 | plugins: [], |
|
37 | minimize: true, |
|
38 | extract: "styles.css", |
|
39 | }), |
|
40 | typescript({ |
|
41 | rollupCommonJSResolveHack: false, |
|
42 | clean: true, |
|
43 | }), |
|
44 | ], |
|
45 | external: Object.keys(pkg.peerDependencies || {}), |
|
46 | }, |
|
47 | ]; |
|
48 |