This commit is contained in:
@@ -4,39 +4,29 @@
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"watch": "npx rollup -c --watch",
|
||||
"build": "npx rollup -c",
|
||||
"lint:tsc": "tsc --noEmit",
|
||||
"lint:biome": "biome lint",
|
||||
"preview": "vite preview",
|
||||
"clean:cache": "rm -rf .turbo node_modules/.tmp node_modules/.vite* .tanstack",
|
||||
"clean:dist": "rm -rf dist",
|
||||
"clean:modules": "rm -rf node_modules"
|
||||
"clean:cache": "rm -rf .turbo",
|
||||
"clean:modules": "rm -rf node_modules/* && touch node_modules/.gdignore"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tanstack/react-router": "^1.139.12",
|
||||
"@tanstack/react-router-devtools": "^1.139.12",
|
||||
"@tanstack/router-plugin": "^1.139.12",
|
||||
"@rollup/plugin-commonjs": "^29.0.0",
|
||||
"@rollup/plugin-inject": "^5.0.5",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@types/react": "^19.2.7",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^5.1.1",
|
||||
"globals": "^16.5.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"type-fest": "^5.2.0",
|
||||
"vite": "^7.2.6"
|
||||
"glob": "^13.0.0",
|
||||
"rollup": "^4.54.0",
|
||||
"rollup-plugin-delete": "^3.0.2",
|
||||
"rollup-plugin-esbuild": "^6.2.1",
|
||||
"rollup-plugin-polyfill-node": "^0.13.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@effect/platform": "^0.93.6",
|
||||
"@effect/platform-browser": "^0.73.0",
|
||||
"@radix-ui/themes": "^3.2.1",
|
||||
"@typed/id": "^0.17.2",
|
||||
"effect": "^3.19.8",
|
||||
"@nberlette/utf8": "^0.4.0",
|
||||
"fast-text-encoding": "^1.0.6",
|
||||
"react": "^19.2.0",
|
||||
"react-godot-renderer": "workspace:*",
|
||||
"react-icons": "^5.5.0"
|
||||
},
|
||||
"overrides": {
|
||||
"@types/react": "^19.2.7",
|
||||
"effect": "^3.19.8",
|
||||
"react": "^19.2.0"
|
||||
"url-shim": "^1.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
49
packages/example/rollup.config.ts
Normal file
49
packages/example/rollup.config.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import commonjs from "@rollup/plugin-commonjs"
|
||||
import inject from "@rollup/plugin-inject"
|
||||
import { nodeResolve } from "@rollup/plugin-node-resolve"
|
||||
import { globSync } from "glob"
|
||||
import path from "node:path"
|
||||
import url from "node:url"
|
||||
import { defineConfig } from "rollup"
|
||||
import del from "rollup-plugin-delete"
|
||||
import esbuild from "rollup-plugin-esbuild"
|
||||
import nodePolyfills from "rollup-plugin-polyfill-node"
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
input: Object.fromEntries(
|
||||
globSync(["./src/**/*.ts"]).map(file => [
|
||||
path.relative(".", file.slice(0, file.length - path.extname(file).length)),
|
||||
url.fileURLToPath(new URL(file, import.meta.url)),
|
||||
])
|
||||
),
|
||||
|
||||
external: [/^godot/, /^jsb/],
|
||||
|
||||
output: {
|
||||
dir: "./.godot/GodotJS",
|
||||
format: "cjs",
|
||||
exports: "named",
|
||||
esModule: true,
|
||||
preserveModules: true,
|
||||
},
|
||||
|
||||
treeshake: true,
|
||||
|
||||
plugins: [
|
||||
esbuild(),
|
||||
nodeResolve(),
|
||||
commonjs(),
|
||||
nodePolyfills({ include: null }),
|
||||
inject({
|
||||
TextEncoder: ["@nberlette/utf8", "TextEncoder"],
|
||||
TextDecoder: ["@nberlette/utf8", "TextDecoder"],
|
||||
TextEncoderStream: ["@nberlette/utf8", "TextEncoderStream"],
|
||||
TextDecoderStream: ["@nberlette/utf8", "TextDecoderStream"],
|
||||
URL: ["url-shim", "URL"],
|
||||
URLSearchParams: ["url-shim", "URLSearchParams"],
|
||||
React: ["react", "*"],
|
||||
}),
|
||||
del({ targets: "./.godot/GodotJS/*" }),
|
||||
],
|
||||
})
|
||||
1
packages/example/rollup.config.ts.uid
Normal file
1
packages/example/rollup.config.ts.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://djsi7p0f1jx6f
|
||||
@@ -27,7 +27,7 @@
|
||||
/* Modules */
|
||||
"module": "esnext", /* Specify what module code is generated. */
|
||||
"rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
"moduleResolution": "bundler", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
|
||||
Reference in New Issue
Block a user