27 lines
628 B
JavaScript
27 lines
628 B
JavaScript
|
const { build, context } = require("esbuild");
|
||
|
const { solidPlugin } = require("esbuild-plugin-solid");
|
||
|
const path = require("path");
|
||
|
const fs = require("fs");
|
||
|
const { glob } = require("glob");
|
||
|
|
||
|
(async() => {
|
||
|
const files = await glob("dist/**/*.jsx");
|
||
|
|
||
|
build({
|
||
|
platform: "node",
|
||
|
entryPoints: files,
|
||
|
bundle: false,
|
||
|
minify: true,
|
||
|
logLevel: "info",
|
||
|
plugins: [solidPlugin({
|
||
|
solid: {
|
||
|
generate: "ssr",
|
||
|
hydratable: true,
|
||
|
},
|
||
|
})],
|
||
|
outdir: "dist",
|
||
|
outbase: "dist",
|
||
|
format: "cjs",
|
||
|
});
|
||
|
})();
|