strona-czynna/esbuild.js
Kuba Orlik 651cd48220 Bring the repo up to speed with our recent developments
Summary:
Remove redundant files

User login fixes

Reviewers: #reviewers

Subscribers: jenkins-user

Differential Revision: https://hub.sealcode.org/D1253
2022-07-31 23:01:24 +02:00

36 lines
733 B
JavaScript

const { build } = require("esbuild");
const { sassPlugin } = require("esbuild-sass-plugin");
const glob = require("tiny-glob");
const watch = process.argv.includes("--watch");
(async () => {
const entryPoints = await glob("./src/back/**/*.ts");
build({
entryPoints,
sourcemap: true,
outdir: "./dist/back",
logLevel: "info",
platform: "node",
watch,
target: "node16",
format: "cjs",
});
build({
entryPoints: ["./src/main.scss"],
sourcemap: true,
outfile: "./public/dist/style.css",
logLevel: "info",
watch,
plugins: [sassPlugin()],
});
build({
entryPoints: ["./src/front/index.ts"],
sourcemap: true,
outfile: "./public/dist/bundle.js",
logLevel: "info",
bundle: true,
watch,
});
})();