-
-
Notifications
You must be signed in to change notification settings - Fork 255
Conversation
Starting with version 4.0.0, the library [dot-prop](https://github.com/sindresorhus/dot-prop) is now [written in ES2015](sindresorhus/dot-prop@88b6eb6), which means it doesn't work in IE anymore or when minifying the code with uglifyjs as the code isn't transpiled. This commit set es6 as format so that the code is transpiled and works in IE and when minifying with uglifyjs
@@ -0,0 +1,3 @@ | |||
{ | |||
"format": "es6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"format": "esm"
is preferred here. Also note to add jspmNodeConversion: false
as well if that is intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see it isn't using modules, just ES features, so just the change to format: 'esm'
should be fine here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Out out curiosity, what is the difference between "format": "esm"
and "format": "es6"
?
I always use the latter: should I always use the former instead ?
Sorry just looking at this again since it is CommonJS, how is this even working with this override? Are you sure you have tested this properly? |
Yes, I've tested it.
|
I get if it builds, but I mean does the code run? If you disable uglify does it work correctly? |
Indeed, it doesn't work.
So, it seems like with |
Exactly. This use case can be described by setting {
"format": "cjs",
"meta": {
"*.js": {
"loader": "babel"
}
}
} The only problem with the above is it then makes the Babel loader a dependency of the project - there is no way in jspm currently to describe that the code uses the latest ES features without tying it to a transpiler instance. I think the edge cases of transpilation are still a little bit too inconsistent for that sort of conceptual model unfortunately. |
I just tried it but it doesn't work (I'm still having this error when building): oligot/jspm-override-dot-prop@173dcd9. |
The above configuration is in jspm 0.17 only. |
I've updated the project to jspm 0.17 but it still does not work.
|
Perhaps try setting |
@oligot it seems this is a bug. Try instead:
|
It works now, thanks ! |
Done |
Glad to hear it is working. As mentioned previously though this isn't suitable for an override because it carries too many assumptions to provide to everyone. I would suggest keeping this as a local override in your project rather. |
Ok, let's close the PR then. |
Starting with version 4.0.0, the library dot-prop is now written in ES2015,
which means it doesn't work in IE anymore or when minifying the
code with uglifyjs as the code isn't transpiled.
This commit set es6 as format so that the code is transpiled and
works in IE and when minifying with uglifyjs