Does it work fine when deployed only an

Does it work fine when deployed & only an issue with Miniflare?
2 Replies
Schmime
Schmime•2y ago
Hi friend, I can confirm it works perfectly with Wrangler develop 🙂 My esbuild:
import { build } from 'esbuild';
// import { commonjs } from '@hyrious/esbuild-plugin-commonjs';
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill';

build({
entryPoints: ['./src/index.ts'],
sourcemap: true,
format: 'esm',
target: 'es2022',
platform: 'node',
bundle: true,
tsconfig: './tsconfig.app.json',
splitting: false,
outdir: '../../dist/apps/backend-workers',
// plugins: [commonjs(), NodeModulesPolyfillPlugin()],
plugins: [NodeModulesPolyfillPlugin()],
}).catch(() => process.exit(1));
import { build } from 'esbuild';
// import { commonjs } from '@hyrious/esbuild-plugin-commonjs';
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill';

build({
entryPoints: ['./src/index.ts'],
sourcemap: true,
format: 'esm',
target: 'es2022',
platform: 'node',
bundle: true,
tsconfig: './tsconfig.app.json',
splitting: false,
outdir: '../../dist/apps/backend-workers',
// plugins: [commonjs(), NodeModulesPolyfillPlugin()],
plugins: [NodeModulesPolyfillPlugin()],
}).catch(() => process.exit(1));
Miniflare version ^2.11.0
MrBBot
MrBBot•2y ago
Hey! 👋 What are you doing in the global scope outside your fetch request handler? Are you importing any dependencies from npm?
Want results from more Discord servers?
Add your server