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

Fail to minify into react-create-app #55

Closed
aureliome opened this issue Apr 11, 2018 · 8 comments
Closed

Fail to minify into react-create-app #55

aureliome opened this issue Apr 11, 2018 · 8 comments
Assignees

Comments

@aureliome
Copy link

aureliome commented Apr 11, 2018

Hi,
congratulations for your job with Bulma-Calendar component, it's great!

I have an issue with react-create-app build and bulma-calendar library.

I import it in this way

import bulmaCalendar from 'bulma-calendar/dist/bulma-calendar';

and it works correctly on development environment (npm run start or react-scripts start).

But if I try to make a build of the application (npm run build or react-scripts build), the build process return this error:

Failed to minify the code from this file:
./node_modules/bulma-calendar/dist/bulma-calendar.js:178
Read more here: http://bit.ly/2tRViJ9

In that link is reported:

To resolve this: Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled. Note: Create React App can consume both CommonJS and ES modules. For Node.js compatibility, it is recommended that the main entry point is CommonJS. However, they can optionally provide an ES module entry point with the module field in package.json. Note that even if a library provides an ES Modules version, it should still precompile other ES6 features to ES5 if it intends to support older browsers.

Can we do anything to resolve it?
Thanks
Aurelio

@Wikiki
Copy link
Collaborator

Wikiki commented Apr 12, 2018

Hi,

This is due to the minify engine.
In dist directory you can find a pre-minified version.

Regards

@aureliome
Copy link
Author

HI,
I have tried also pre-minified version and I have same issue.

Regards
Aurelio

@Wikiki Wikiki self-assigned this Apr 13, 2018
@Wikiki
Copy link
Collaborator

Wikiki commented Apr 13, 2018

For information on my side I use gulp-babel-minify module to minify the source.

@rupps9800
Copy link

Have same issue es6 but need es5 when making production build. Perhaps a es5 version would be accommodating for some of us.

@Wikiki
Copy link
Collaborator

Wikiki commented Jun 6, 2018

Hi, don't hesitate to modify package.browsers rule and compile it using gulp to get a ES5 working version ;-)

@Wikiki Wikiki closed this as completed in 37019a6 Jun 8, 2018
@Wikiki
Copy link
Collaborator

Wikiki commented Jun 8, 2018

🎉 This issue has been resolved in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@stevensacks
Copy link

@aureliome @rupps9800

I rewrote this lib from the ground up for use in React, leveraging his great SASS styling, but made specifically for React.

I've open-sourced the code here:
https://gist.github.com/stevensacks/79c60d0f8b1f8bc06b475438f59d687e

Note that my implementation uses my Dialog as a Promise component, which is also open-source (and linked to). You can use that also if you like. But if you don't, you're free to modify DatePicker.js to use whatever methodology you prefer. This is why I haven't turned it into standalone "npm install" library.

Hope you find it useful!

@devth
Copy link

devth commented Jul 1, 2019

Would be awesome to get a React component up on npm for this!

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

5 participants