Skip to content

Releases: davidmyersdev/vite-plugin-node-polyfills

v0.11.3

22 Aug 02:29
v0.11.3
ec47b5a
Compare
Choose a tag to compare
  • Add a workaround for a Yarn v1 bug

v0.11.2

17 Aug 04:15
v0.11.2
6ec4c54
Compare
Choose a tag to compare

v0.11.2

  • Make sure globals (Buffer, global, and process) are properly shimmed in all environments.
  • Replace upstream global shims with newer dependencies

v0.9.0

09 Jun 05:46
v0.9.0
91c0052
Compare
Choose a tag to compare

Allow globals (Buffer, global, and process) to be disabled for build, dev, or both.

import { defineConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    nodePolyfills({
      // Whether to polyfill specific globals.
      globals: {
        Buffer: 'dev', // defaults to true
        global: false, // defaults to true
        process: 'build', // defaults to true
      },
    }),
  ],
})

v0.8.2

26 Apr 02:56
v0.8.2
9ef0406
Compare
Choose a tag to compare

Update usage examples

v0.8.1

11 Apr 13:41
v0.8.1
120e107
Compare
Choose a tag to compare

Features

Specific modules can now be excluded via the new exclude configuration option.

nodePolyfills({
  exclude: ['fs'],
})

v0.7.0

10 Jan 01:40
v0.7.0
9f8f4f4
Compare
Choose a tag to compare

Fix Vite optimization error on esbuild injected shims.

v0.6.0

26 Dec 05:16
v0.6.0
13fb818
Compare
Choose a tag to compare

Add support for Vite v4