mirror of
https://github.com/SteamDeckHomebrew/decky-plugin-template.git
synced 2025-12-17 02:43:01 -06:00
Added support for static assets
This commit is contained in:
parent
76470f49a8
commit
f554798ee4
9 changed files with 120 additions and 949 deletions
|
|
@ -4,6 +4,9 @@ import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|||
import replace from '@rollup/plugin-replace';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import { defineConfig } from 'rollup';
|
||||
import importAssets from 'rollup-plugin-import-assets';
|
||||
|
||||
import { name } from "./plugin.json";
|
||||
|
||||
export default defineConfig({
|
||||
input: './src/index.tsx',
|
||||
|
|
@ -16,6 +19,9 @@ export default defineConfig({
|
|||
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'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue