28 lines
643 B
JavaScript
28 lines
643 B
JavaScript
|
const { context } = require("esbuild");
|
||
|
const { solidPlugin } = require("esbuild-plugin-solid");
|
||
|
|
||
|
(async () => {
|
||
|
const ctx = await context({
|
||
|
platform: "browser",
|
||
|
entryPoints: [
|
||
|
"src/views/hydration.ts",
|
||
|
],
|
||
|
bundle: true,
|
||
|
minify: false,
|
||
|
logLevel: "info",
|
||
|
plugins: [
|
||
|
solidPlugin({
|
||
|
solid: {
|
||
|
generate: "dom",
|
||
|
hydratable: true,
|
||
|
},
|
||
|
})
|
||
|
],
|
||
|
outdir: "static",
|
||
|
format: "cjs",
|
||
|
});
|
||
|
|
||
|
await ctx.watch();
|
||
|
console.log("Watching hydration script...");
|
||
|
})();
|