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

Consider setting pluginFirst by default #1092

Closed
guybedford opened this issue Feb 11, 2016 · 4 comments
Closed

Consider setting pluginFirst by default #1092

guybedford opened this issue Feb 11, 2016 · 4 comments

Comments

@guybedford
Copy link
Member

I'd really value feedback here.

SystemJS initially had a custom plugin syntax for convenience of the form import 'x.css!' as it was neater.

But now we emphasize using plugin loader configuration instead.

Since plugin syntax is no longer such an important feature, we could make the AMD and Webpack plugin syntax style of plugin!module the default in the next major release, which would provide an easier upgrade path for existing code.

The pluginFirst option would then be fully deprecated and the trailing plugin syntax no longer supported.

@ffflabs
Copy link

ffflabs commented Feb 12, 2016

I completely agree. Coming from RequireJS I had tons of modules declaring the plugin mapping before the module name.

Besides, you could want to load a given CSS file using the text plugin, and other CSS files with the css loader. You could resort to meta config, but it's cleaner if each module can decide what loader use for what.

@guybedford
Copy link
Member Author

Thanks for mentioning. Yes I think we'll definitely move to doing this in the next breaking release.

@aluanhaddad
Copy link

While I certainly use configuration instead of loader syntax in most cases, I actually like the trailing !.
In spite of have been through the pain of having to convert hundreds of AMD style plugin syntax expressions when migrating from RequireJS to SystemJS, I think the trailing ! is far more readable.

@guybedford
Copy link
Member Author

Logically this is the right thing to do, but I really do think the import 'x.css!' syntax is better for plugins.

This is going to be a pain because Webpack doesn't support pluginLast... maybe if we ask @sokra nicely he can consider supporting it one day.

So I'm going to push this out for another day... If anyone disagrees please let me know now :)

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

No branches or pull requests

3 participants