Releases: davidmyersdev/vite-plugin-node-polyfills
Releases · davidmyersdev/vite-plugin-node-polyfills
v0.11.3
- Add a workaround for a Yarn v1 bug
v0.11.2
v0.11.2
- Make sure globals (
Buffer
,global
, andprocess
) are properly shimmed in all environments. - Replace upstream global shims with newer dependencies
v0.9.0
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
Update usage examples
v0.8.1
Features
Specific modules can now be excluded via the new exclude
configuration option.
nodePolyfills({
exclude: ['fs'],
})
v0.7.0
Fix Vite optimization error on esbuild injected shims.
v0.6.0
Add support for Vite v4