-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
30 lines (28 loc) · 821 Bytes
/
rollup.config.mjs
File metadata and controls
30 lines (28 loc) · 821 Bytes
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 commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import copy from 'rollup-plugin-copy';
import del from 'rollup-plugin-delete';
import postcss from 'rollup-plugin-postcss';
/**
* @type {import('rollup').RollupOptions}
*/
export default {
external: ['react', 'react-dom', 'react/jsx-runtime'],
input: ['./src/index.ts', './twPlugin/auTwPlugin.ts'],
output: [{ dir: './dist/', format: 'esm', sourcemap: true }],
plugins: [
del({ targets: 'dist/*' }),
resolve(),
commonjs(),
typescript({ tsconfig: './tsconfig.json' }),
postcss({
minimize: true,
extract: true,
sourceMap: true,
}),
copy({
targets: [{ src: './package.json', dest: 'dist/' }],
}),
],
};