Skip to content
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

Make it a transform #13

Open
dy opened this issue Dec 15, 2018 · 3 comments
Open

Make it a transform #13

dy opened this issue Dec 15, 2018 · 3 comments

Comments

@dy
Copy link

dy commented Dec 15, 2018

Since now that is a plugin, it is impossible to use this via "browserify" field in package.json.
There does not seem to be blocker making it a transform. @ericmorand what do you think?

@ericmorand
Copy link
Collaborator

Really? Plugins can't be declared in package.json?

Let me check if it possible to have it a transform. There may be a good reaon to have it a plugin but it's been years now so I can't remember.

@ericmorand
Copy link
Collaborator

ericmorand commented Dec 17, 2018

OK, I checked why it's been made a plugin in the first place and this is due to the fact that a transform can't emit on the browserify pipeline - and thus can't emit dependencies involved in the bundle process.

Maybe when can have glslify-require comes in two flavors: a transform as the main entry point and a plugin that would need to be required explicitely (think glslify-require/plugin) that would provide dependencies emiting. Thus, middlewares could require the plugin while people with simpler needs could use the transform - either via the API or package.json.

That would of course be a breaking change and thus a 2.x milestone.

What do you think?

@dy
Copy link
Author

dy commented Dec 17, 2018

@ericmorand agreed, makes sense to make transform a default entry, as browserify does for its "browser" field. Then we would be able to use that directly from browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants