mirror of
				https://github.com/SteamDeckHomebrew/decky-plugin-template.git
				synced 2025-10-30 23:02:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			770 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			770 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import commonjs from '@rollup/plugin-commonjs';
 | |
| import json from '@rollup/plugin-json';
 | |
| 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(),
 | |
|     json(),
 | |
|     replace({
 | |
|       preventAssignment: false,
 | |
|       'process.env.NODE_ENV': JSON.stringify('production'),
 | |
|     }),
 | |
|   ],
 | |
|   context: 'window',
 | |
|   external: ['react', 'react-dom'],
 | |
|   output: {
 | |
|     file: 'dist/index.js',
 | |
|     globals: {
 | |
|       react: 'SP_REACT',
 | |
|       'react-dom': 'SP_REACTDOM',
 | |
|     },
 | |
|     format: 'iife',
 | |
|     exports: 'default',
 | |
|   },
 | |
| });
 |