-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix build script #36
Fix build script #36
Conversation
I think it would make sense to comment on multiformats/js-cid#38 and let them know that transpiling to ES5 fixes their issue, with no need to fix any duck typing or whatever else they go on about. I can let them know, if you want. |
bb06c14
to
bb60deb
Compare
…f scripts Add correct file execute permissions
bb60deb
to
c010aae
Compare
Yeah. Awesome. Thanks. |
Update 10/16/2017 Transpiling is not really necesary - It would be if we were targeting browsers that do not understand The By removing the To remove the minify step I had to The other error, the one that reads in the lines of loading insecure content in https was fixed here: #39. This error did not stop the app for working correctly but there are problems with the IPFS network (discussed here) because the IPFS is working very slowly. |
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.
AAAAAAAAHHHH 🙈 🙈 🙈
I've heard that ejecting a create-react-app
app is ugly. Boy is it ever!
We're not doing much fanciness. All the fanciness that create-react-app
and react-scripts
were hiding from us was great to have, but without it, I suspect that creating our own webpack.config
will save us time over the life of this project, even given that this project is only going to take another 4-6 weeks.
I guess the questions to answer are:
- How long do you think it would take to make our own
start
andbuild
scripts, using Webpack ourselves? - How much time do you think we'll waste, trying to comprehend wtf is happening with all of this?
Why do you want to make our own start & build scripts? The
I think we can carry on with this new files, everything works as before. The difference is we now have the files out there instead of using a command that would simply hide all this from us.
If we have to go down this path, I think we could take our app and implement Even if it were 2-3 days to make our own, I still think we can work with what was |
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.
Ok, you've convinced me.
Ref: #34
This was tedious and in the end it worked, kind of, I'll explain more after I describe what is happening:
Apparently some dependencies (IPFS and tools/libraries that work with IPFS) do not export an
es5
version of their code nor do they transpile from theires6
source in their build process.There are several ways we could approach this. I thought the dependency list couldn't be so big so I decided to manually hack the source code directly transpiling and uglifying it. It seemed never ending - at some point during all this manual repeat process I thought I should've written a script to figure out the list but the thought of "one more and lets see if I get there" kept me going. Finally I added all the dependencies and the build script succeeded.
Sometimes after running this script
./scripts/hack-build.sh
and runningyarn build
the build process may complain about not being able to minify a dependency. In my case the dependency was included in the list of files here but none the less the file was nottranspiled
noruglified
. Weird. In such cases running the process on such file directly and then executing the build command again worked.To run the script on one file use the following:
. ./scripts/hack-source.sh && hack_source PATH_TO_FILE
(in the path to file don't add the node_modules directory. e.gipld-git/src/util/tag.js
)So, the build command exited successfully. I deployed and then encountered this:
But I carried on, and then this happened when I tried to save a GIF:
I will continue working on this and update appropriately.