question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configure plugins via package.json similar to `browserify.transform`

See original GitHub issue

Configuring transforms via the browserify.transform field in package.json is lovely. It’s a great way to configure browserify once regardless where/how browserify is executed (manually or via npm script or other).

It would be even more lovely to support configuring plugins via package.json as well.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

3reactions
jasonkarnscommented, May 12, 2015

So this is an issue if dependencies specify a browserify plugin in their package.json. Since plugins can only be specified at the command line (or via the API), there is currently no way to have a plugin only apply to a dependency.

So could this feature be implemented by having browserify only respect the browserify.plugin field at the top level? That way specifying a package.json thusly:

"browserify": {
  "plugin": [ "my-plugin" ]
}

is identical to browserify -p my-plugin. Any browserify.plugin fields in dependencies are ignored.

(If I understand the issue correctly)

0reactions
ahmadrasyidsalimcommented, Mar 15, 2019

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browserify - order of transforms/plugins - Stack Overflow
Specifically, I'd like to use aliasify and tsify together and to that end, aliasify has to run first. How would you go about...
Read more >
serverless-plugin-browserifier - npm package - Snyk
A Serverless plugin that uses browserify to bundle your Node.js Lambda functions. Works with serverless versions 1 to 3. Supported Commands · Motivation ......
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
It's similar to Browserify and webpack. ... Install Rollup's Babel plugin. npm install --save-dev rollup-plugin-babel # Install the Babel preset for ...
Read more >
Simplifyify | A simplified Browserify and Watchify CLI
The same technique described above for Browserify transforms also works for Browserify plugins. Just add a browserify.plugins field to your package.json file.
Read more >
Browserify
Bundle up your first module ; Install the uniq module with npm: ; Now recursively bundle up all the required modules starting at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found