-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide a specif builtin version #1980
Comments
That version of If you install your desired version using npm, you can use the
or with the API:
The trailing / is important: it forces the resolver to look at the files and dependencies in your project instead of at node.js core modules. |
thanks for the support. const browserify = require('browserify')
const watchify = require('watchify')
const errorify = require('errorify')
const fs = require('fs')
const b = browserify('./src/index.js', {
builtins: {
buffer: require.resolve('buffer/'),
_process: require.resolve('process/browser'),
events: require.resolve('events/'),
util: require.resolve('util/util.js'),
stream: require.resolve('stream-browserify'),
timers: require.resolve('timers-browserify'),
string_decoder: require.resolve('string_decoder/')
},
standalone: 'lib',
plugin: process.env.NODE_ENV ? [watchify, errorify] : []
})
const bundle = () => {
b.bundle()
.on('error', console.error)
.pipe(fs.createWriteStream('dist/index.js'))
}
if (process.env.NODE_ENV) {
b.on('update', bundle)
}
bundle() it is something similar to what you proposed I guess |
Hi, is there any chance to specify a specific version of a builtin?
I need to create a bundle which uses
[email protected]
thanks
The text was updated successfully, but these errors were encountered: