2024-07-09 01:28:57 +01:00
|
|
|
import deckyPlugin from "@decky/rollup";
|
2024-06-13 23:11:44 +01:00
|
|
|
|
2024-07-09 01:28:57 +01:00
|
|
|
export default deckyPlugin({
|
|
|
|
// Add your extra Rollup options here
|
2024-10-24 03:33:31 +01:00
|
|
|
input: './src/index.tsx',
|
|
|
|
plugins: [
|
|
|
|
commonjs(),
|
|
|
|
nodeResolve(),
|
|
|
|
typescript(),
|
|
|
|
json(),
|
|
|
|
replace({
|
|
|
|
preventAssignment: false,
|
|
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
|
|
}),
|
|
|
|
importAssets({
|
|
|
|
publicPath: `http://127.0.0.1:1337/plugins/${name}/`
|
|
|
|
})
|
|
|
|
],
|
|
|
|
context: 'window',
|
|
|
|
external: ['react', 'react-dom', 'decky-frontend-lib'],
|
|
|
|
output: {
|
|
|
|
file: 'dist/index.js',
|
|
|
|
globals: {
|
|
|
|
react: 'SP_REACT',
|
|
|
|
'react-dom': 'SP_REACTDOM',
|
|
|
|
'decky-frontend-lib': 'DFL',
|
|
|
|
},
|
|
|
|
format: 'iife',
|
|
|
|
exports: 'default',
|
|
|
|
},
|
|
|
|
})
|