Files
transmission/web/esbuild.mjs
Yat Ho d31e77a494 chore: update transmission-web package (#7003)
* chore: update minor versions

* chore: bump to `style-loader@4`

major version change

* refactor: combine `#mainwin-toolbar:nth-last-child(2)` rule

* refactor: cleanup scss definitions

Notes: `.single-file` is no longer used in code

* chore: bump `esbuild-sass-plugin@3` `esbuild@0.25`

* chore: uninstall unused `stylelint-config-standard`

In fact, it was never used since added to `package.json`.

* chore: bump `stylelint@16` `stylelint-config-sass-guidelines@12`

* chore: bump `eslint@9` `eslint-plugin-sonarjs@1` `eslint-plugin-unicorn@61`

* chore: enable prettier for whole `transmission-web` package

* chore: bump `@primer/stylelint-config@13`

* chore: update minor versions

* build: remove lint config files from CMake dependency

* chore: bump minor versions

* chore: bump `eslint-plugin-sonarjs@3`

* ci: use `actions/setup-node@v4` to install Node.js

So that there's no risk of the OS package manager's Node.js version being too low.

Except in Alpine, which does not work with `actions/setup-node@v4`. Ref: https://github.com/actions/setup-node/issues/387

* chore: replace `lodash.isEqual` with `fast-deep-equal`

* chore: bump minor versions

* chore: re-generate package-lock.json

* chore: fix lint errors
2025-10-25 12:09:36 -05:00

26 lines
546 B
JavaScript

import * as esbuild from 'esbuild';
import * as process from 'node:process';
import { sassPlugin } from 'esbuild-sass-plugin';
const ctx = await esbuild.context({
bundle: true,
entryPoints: ['./src/main.js'],
legalComments: 'external',
loader: {
'.png': 'dataurl',
'.svg': 'dataurl',
},
minify: true,
outfile: './public_html/transmission-app.js',
plugins: [sassPlugin()],
sourcemap: true,
});
if (process.env.DEV) {
await ctx.watch();
console.log('watching...');
} else {
await ctx.rebuild();
ctx.dispose();
}