diff options
| author | Jonas Dellinger <jonas@dellinger.dev> | 2022-04-23 00:42:11 +0200 |
|---|---|---|
| committer | Jonas Dellinger <jonas@dellinger.dev> | 2022-04-23 00:42:11 +0200 |
| commit | 52f6ca1c587df2cc74b986bc82419c867c404f47 (patch) | |
| tree | 9a6b17d7eb1e548d304f11dc97ebfdda83a45987 /rollup.config.js | |
| download | decky-bazzite-buddy-52f6ca1c587df2cc74b986bc82419c867c404f47.tar.gz decky-bazzite-buddy-52f6ca1c587df2cc74b986bc82419c867c404f47.zip | |
Initial commit
Diffstat (limited to 'rollup.config.js')
| -rw-r--r-- | rollup.config.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..52abadb --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,28 @@ +import commonjs from '@rollup/plugin-commonjs'; +import { nodeResolve } from '@rollup/plugin-node-resolve'; +import replace from '@rollup/plugin-replace'; +import typescript from '@rollup/plugin-typescript'; +import { defineConfig } from 'rollup'; + +export default defineConfig({ + input: './src/index.tsx', + plugins: [ + commonjs(), + nodeResolve(), + typescript(), + replace({ + preventAssignment: false, + 'process.env.NODE_ENV': JSON.stringify('production'), + }), + ], + context: 'window', + external: ['react', 'react-dom'], + output: { + file: 'dist/example-plugin.js', + globals: { + react: 'SP_REACT', + }, + format: 'iife', + exports: 'default', + }, +}); |
