aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/ui-react-lib/rollup.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ui-react-lib/rollup.config.js')
-rwxr-xr-xruntime/ui-react-lib/rollup.config.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/runtime/ui-react-lib/rollup.config.js b/runtime/ui-react-lib/rollup.config.js
new file mode 100755
index 000000000..c671779c0
--- /dev/null
+++ b/runtime/ui-react-lib/rollup.config.js
@@ -0,0 +1,48 @@
+import babel from 'rollup-plugin-babel'
+import commonjs from '@rollup/plugin-commonjs'
+import postcss from 'rollup-plugin-postcss'
+import resolve from '@rollup/plugin-node-resolve'
+import external from 'rollup-plugin-peer-deps-external'
+import img from '@rollup/plugin-image'
+
+import pkg from './package.json'
+
+export default {
+ input: './libIndex.js',
+ output: [
+ {
+ file: pkg.main,
+ format: 'cjs',
+ sourcemap: true
+ },
+ {
+ file: pkg.module,
+ format: 'es',
+ sourcemap: true
+ }
+ ],
+ plugins: [
+ img(),
+ external(),
+ postcss({
+ modules: true
+ }),
+ babel({
+ exclude: 'node_modules/**',
+ presets: [
+
+ "@babel/preset-env", {},
+ "@babel/preset-react", {}
+ ],
+ plugins: [
+ [
+ "@babel/plugin-proposal-class-properties",
+ {
+ "loose": true
+ }
+ ]
+ ]
+ }),
+ resolve({ preferBuiltins: true, mainFields: ['browser'] })
+ ]
+}