Skip to content

v0.9.0

Compare
Choose a tag to compare
@davidmyersdev davidmyersdev released this 09 Jun 05:46
· 76 commits to main since this release
v0.9.0
91c0052

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
      },
    }),
  ],
})