-
-
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
ie11 (and other 'es5'-browsers) problem with transpile #477
Comments
@yyynnn Just checked the final code in v1.8.4, everything looks fine in es5. Any further information please? |
I've had the same issue after upgrading from 1.7.8 to 1.8.4, IE11 was logging a SyntaxError because of some arrow function in dayjs. |
This is also happening to us. We are using an ejected version of create react app's webpack build script with minimal changes. The build script isn't able to minify the js. I believe this is because our build script is a little outdated. https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify Newer versions of create react app's webpack build script probably include a loader that transpiles node_modules that are included via the Should that change have been a major version bump? |
When we remove the "module" property pointing to "./src/index.js" in our local dayjs module, our build process works successfully: With the "module" property, it fails: I think it might be related to #451. |
We've added a "module" property in package.json file after v1.8.0+, and pointed to the /src folder which is the source code in es6 with import/export syntax. This is to made our lib treeshakeable with the help of modern bundle tool like webpack. This issue is an unexpected behavior, and should be fix in the coming hotfix in a few days. Just I'm not sure how to fix this, if I point "module" to the compiled es5 code, that makes no sense. Anyone could help? |
@iamkun I think you have two options to fix this:
For what it's worth, I prefer the first option. I could open a PR for this too, if you're interested. |
option 1 pr welcome 😁 |
## [1.8.5](v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](#478)) ([508c3a7](508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](#477)) ([#480](#480)) ([#482](#482)) ([767017d](767017d)) * update customParseFormat plugin support hh:mm ([54947cc](54947cc)), closes [#484](#484) * Update module in package.json ([5c5a7a0](5c5a7a0))
Try hotfix v1.8.5, contains @Tvrqvoise's fix, hope this will help. |
Confirmed that v1.8.5 works for me. Thanks @iamkun for the quick updates and the great library! |
yeah cool |
## [1.8.5](iamkun/dayjs@v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](iamkun/dayjs#478)) ([508c3a7](iamkun/dayjs@508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](iamkun/dayjs#477)) ([#480](iamkun/dayjs#480)) ([#482](iamkun/dayjs#482)) ([767017d](iamkun/dayjs@767017d)) * update customParseFormat plugin support hh:mm ([54947cc](iamkun/dayjs@54947cc)), closes [#484](iamkun/dayjs#484) * Update module in package.json ([5c5a7a0](iamkun/dayjs@5c5a7a0))
## [1.8.5](iamkun/dayjs@v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](iamkun/dayjs#478)) ([508c3a7](iamkun/dayjs@508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](iamkun/dayjs#477)) ([#480](iamkun/dayjs#480)) ([#482](iamkun/dayjs#482)) ([767017d](iamkun/dayjs@767017d)) * update customParseFormat plugin support hh:mm ([54947cc](iamkun/dayjs@54947cc)), closes [#484](iamkun/dayjs#484) * Update module in package.json ([5c5a7a0](iamkun/dayjs@5c5a7a0))
## [1.8.5](iamkun/dayjs@v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](iamkun/dayjs#478)) ([508c3a7](iamkun/dayjs@508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](iamkun/dayjs#477)) ([#480](iamkun/dayjs#480)) ([#482](iamkun/dayjs#482)) ([767017d](iamkun/dayjs@767017d)) * update customParseFormat plugin support hh:mm ([54947cc](iamkun/dayjs@54947cc)), closes [#484](iamkun/dayjs#484) * Update module in package.json ([5c5a7a0](iamkun/dayjs@5c5a7a0))
Dayjs not transpiling down to es5 on version 1.8.4, leaving es6 code in bundle. (the babel/ts webpack config is fine)
1.7.4 is the last known working version
The text was updated successfully, but these errors were encountered: