Export template source from ba8d4f92667f39bb02d542cb492b71a32ec914bf:quixos-instance/packages/todo-react-runtime

This commit is contained in:
Quixos Template Publisher
2000-01-01 00:00:00 +00:00
commit 920d9ff004
32 changed files with 1897 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import { build } from "esbuild";
const platformModules = new Map([
[
"@quixos/web-studio-react-runtime",
"/__quixos/platform/web-studio-react-runtime/v1.mjs",
],
["react", "/__quixos/platform/react/v18.mjs"],
["react/jsx-runtime", "/__quixos/platform/react-jsx-runtime/v18.mjs"],
["react/jsx-dev-runtime", "/__quixos/platform/react-jsx-dev-runtime/v18.mjs"],
]);
await build({
entryPoints: ["dist/todo-component.js"],
outfile: "dist/todo-component.mjs",
bundle: true,
format: "esm",
platform: "browser",
target: "es2022",
sourcemap: true,
plugins: [
{
name: "quixos-platform-modules",
setup(buildApi) {
buildApi.onResolve({ filter: /.*/ }, (args) => {
const platformPath = platformModules.get(args.path);
return platformPath
? { path: platformPath, external: true }
: undefined;
});
},
},
],
});