Closed Jand42 closed 7 months ago
Same with esbuild
:
import { build } from 'esbuild'
var options =
{
entryPoints: ['./wwwroot/Scripts/WebSharper/Web/root.js'],
bundle: true,
minify: true,
format: 'iife',
outfile: 'wwwroot/Scripts/WebSharper/bundle.js',
globalName: 'wsbundle'
};
build(options);
For #1361, bundling STEP 1, WS creates a
root.js
if a new"preBundle": true
config is set, which can be bundled into abundle.js
(these names are hardcoded atm, to be configured better) and then Sitelets runtime will use this. TODO fix C# tests not passing yet.Look at
Web
project for a sample how it works. Project file hasWhile
rollup.config.mjs
has: