davidmyersdev / vite-plugin-node-polyfills

A Vite plugin to polyfill Node's Core Modules for browser environments.
MIT License
301 stars 22 forks source link

Bug: cannot polyfill the node process? #98

Open devnomic opened 3 months ago

devnomic commented 3 months ago
node_modules/@trigger.dev/core-backend/dist/index.mjs (2:9): "env" is not exported by "node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js", imported by "node_modules/@trigger.dev/core-backend/dist/index.mjs"
nodePolyfills({
      include: ["buffer", "process"],
      globals: {
        Buffer: true,
        process: true,
      },
    }),

Code that trigger errors:

import { Buffer } from 'node:buffer';
import { env } from 'node:process'; <-- here