diff options
| author | AAGaming <aagaming@riseup.net> | 2024-07-08 20:28:57 -0400 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-07-08 20:28:57 -0400 |
| commit | 93ef11096f2a0a094de2b7094b817f110bc5ea3b (patch) | |
| tree | b2cdc031deb2ede5445bb1cd464ea8ab5ca1f53d /rollup.config.js | |
| parent | 64310bcf71c5e9ec463a840642968900e2f4882d (diff) | |
| download | decky-bazzite-buddy-93ef11096f2a0a094de2b7094b817f110bc5ea3b.tar.gz decky-bazzite-buddy-93ef11096f2a0a094de2b7094b817f110bc5ea3b.zip | |
use @decky/rollup rollup config template
Diffstat (limited to 'rollup.config.js')
| -rw-r--r-- | rollup.config.js | 52 |
1 files changed, 4 insertions, 48 deletions
diff --git a/rollup.config.js b/rollup.config.js index 02d02c5..17e71a7 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,49 +1,5 @@ -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'; -import del from 'rollup-plugin-delete'; -import importAssets from 'rollup-plugin-import-assets'; -import externalGlobals from 'rollup-plugin-external-globals'; - -// replace "assert" with "with" once node implements that -import manifest from './plugin.json' assert { type: 'json' }; - -export default defineConfig({ - input: './src/index.tsx', - plugins: [ - del({ targets: './dist/*', force: true }), - commonjs(), - nodeResolve({ - browser: true - }), - externalGlobals({ - react: 'SP_REACT', - 'react-dom': 'SP_REACTDOM', - '@decky/ui': 'DFL', - '@decky/manifest': JSON.stringify(manifest) - }), - typescript(), - json(), - replace({ - preventAssignment: false, - 'process.env.NODE_ENV': JSON.stringify('production'), - }), - importAssets({ - publicPath: `http://127.0.0.1:1337/plugins/${manifest.name}/` - }) - ], - context: 'window', - external: ['react', 'react-dom', '@decky/ui'], - output: { - dir: 'dist', - format: 'esm', - sourcemap: true, - // **Don't** change this. - sourcemapPathTransform: (relativeSourcePath) => relativeSourcePath.replace(/^\.\.\//, `decky://decky/plugin/${encodeURIComponent(manifest.name)}/`), - exports: 'default' - }, -}); +import deckyPlugin from "@decky/rollup"; +export default deckyPlugin({ + // Add your extra Rollup options here +})
\ No newline at end of file |
