We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How can I pass babelify options using the node API?
With the command line API, I can do something like this:
-t [ babelify --presets [ env ] --extensions .ts ]
But with the Node API, this fails:
budo('src/app.ts:dist/app.js', { ... browserify: { transform: [babelify, { presets: ['@babel/preset-env'], extensions: '.ts', }], }, ...
The error messages is TypeError: Path must be a string.. That error message comes from node_modules/resolve/lib/async.js.
TypeError: Path must be a string.
node_modules/resolve/lib/async.js
What's the proper syntax for passing options to babelify? Maybe an example could be added to the README.
The text was updated successfully, but these errors were encountered:
Probably the best is to require('babelify').configure({ ... })
require('babelify').configure({ ... })
You can also use subarg with a nested array, I believe. Not at my work station now to check, though.
budo('src/app.ts:dist/app.js', { ... browserify: { transform: [ [ babelify, { presets: ['@babel/preset-env'], extensions: '.ts', } ] ], }
Sorry, something went wrong.
@mattdesl thanks, that seems to work! However, now I'm having issues with specifying a plugin.
This works:
budo src/app.ts:dist/app.js \ -d public -d . -d src \ --live -- \ -d -p tsify -t [ babelify --presets [ @babel/env ] --extensions .ts ]
However, with this node based config...
budo('src/app.ts:dist/app.js', { dir: ['public', '.', 'src'], live: true, stream: process.stdout, port: 9966, debug: true, browserify: { plugin: tsify, transform: [babelify.configure({ presets: ['@babel/preset-env'], extensions: '.ts', })], }, })
...I'm getting TypeScript errors:
It seems that the TypeScript files aren't being processed, even though the two configs look equivalent to me (but I must be overlooking something).
Any idea?
No branches or pull requests
How can I pass babelify options using the node API?
With the command line API, I can do something like this:
But with the Node API, this fails:
The error messages is
TypeError: Path must be a string.
. That error message comes fromnode_modules/resolve/lib/async.js
.What's the proper syntax for passing options to babelify? Maybe an example could be added to the README.
The text was updated successfully, but these errors were encountered: