-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Efficient IE11 support #1168
Comments
I think this is more of an RFC and doesn't have much to do with IE11. If I understand correctly what you want is to target both old browsers and new ones supporting ES6 modules? How should we handle imports to non-js modules, like CSS? Should we generate intermediary modules for it? How should handle CommonJS (
import {foo} from './bar'
console.log('Foo', foo)
import React from 'react'
import {fooClass} from './index.css'
module.exports.foo = <h2 className={fooClass}bar</h2>
.fooClass {
background: url('./asset.png')
} That said I think this is an extremely cool feature to have. |
Sounds like #41? |
I was aiming for something a little more specific than #41. |
One problem I've experienced with this strategy is handling non-strict mode dependencies. Normally when bundling, strict mode can be individually applied to dependencies. However, scripts loaded with |
This is done as of #6247. If you use |
IE 11 will continue to be supported by Microsoft for several years, and people tell me that I have to support IE 11. However, I write code in ES2015, so I am going to have to transpile it to es5 and bundle it with all the necessary polyfills for older browsers. But I don't want modern browsers to have to load the huge bundle. I don't think I am alone in wanting that.
I would like <script src="myscript.js"> to be transformed into something like this
with a little boilerplate to prevent browsers like safari 10.1 from running the legacy bundle if they have already run the modern bundle.
IE 11 downloads both bundles, but only runs the legacy bundle.
Answers to objections
and yet some of us still need to support IE 11.
Of course, I would like parcel to support this by default, but I would settle for a plugin. How hard would it be to write a plugin that enables this? Where should I start?
The text was updated successfully, but these errors were encountered: