Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Adding Aliasify global transform options #510

Merged
merged 1 commit into from
Nov 2, 2018
Merged

Adding Aliasify global transform options #510

merged 1 commit into from
Nov 2, 2018

Conversation

evandeininger
Copy link
Contributor

Unfortunately Browserify says you can't make global transforms from package.json:
https://github.com/browserify/browserify#btransformtr-opts
"If opts.global is true, the transform will operate on ALL files, despite whether they exist up a level in a node_modules/ directory. Use global transforms cautiously and sparingly, since most of the time an ordinary transform will suffice. You can also not configure global transforms in a package.json like you can with ordinary transforms."

Unfortunately Browserify says you can't make global transforms from package.json:
https://github.com/browserify/browserify#btransformtr-opts
"If opts.global is true, the transform will operate on ALL files, despite whether they exist up a level in a node_modules/ directory. Use global transforms cautiously and sparingly, since most of the time an ordinary transform will suffice. You can also not configure global transforms in a package.json like you can with ordinary transforms."
@@ -98,6 +98,18 @@ First, install it: `npm install --save-dev aliasify`
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think it'd be possible to add "global":true to the package.json version above too? or is the global option only exposed when using the transform via Browserify's Node API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to see if that works just in case but the documentation seems to say you can only use the global transform option from the api or the cli:
https://github.com/browserify/browserify#btransformtr-opts
"[...] You can also not configure global transforms in a package.json like you can with ordinary transforms."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aw :( I wonder why they don't allow that

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants