mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
* This is a nightmare * Checkpointing.... getting closer * First cut - packaging the server in a docker container * Remove busted bundles * Minify build * Some common commands for building - we're going to look into proper monorepo solutions soon * Remove dependency on serve-static * Add web serving, full-stack docker target, and Nvidia container support * Remove test action graph for now
25 lines
508 B
TypeScript
25 lines
508 B
TypeScript
import { Plugin } from 'esbuild';
|
|
|
|
/**
|
|
* The node: protocol was added to require in Node v14.18.0
|
|
* https://nodejs.org/api/esm.html#node-imports
|
|
*/
|
|
export const nodeProtocolPlugin = (): Plugin => {
|
|
const nodeProtocol = 'node:';
|
|
|
|
return {
|
|
name: 'node-protocol-plugin',
|
|
setup({ onResolve }) {
|
|
onResolve(
|
|
{
|
|
filter: /^node:/,
|
|
},
|
|
({ path }) => ({
|
|
path: path.slice(nodeProtocol.length),
|
|
external: true,
|
|
}),
|
|
);
|
|
},
|
|
};
|
|
};
|