I've spent two day reading, and following tutorials. I have learned a lot, but I am stuck. I was able to accomplish things listed in tutorials but not combine them together.
Please write me a configuration file that would these things
- Compile Sass/Scss files into CSS file into public folder, not inline them anywhere.
- Transpile JSX/Es6 files into one file (I got this).
- Auto Refresh/Load page when Css OR Html changes.
- Auto Refresh/Load page when Javascript changes or React component etc.
- Plus Run via my own Nodejs Express server, not use webpack dev server, I want to avoid running multiple simultaneous processes. They make things hard.
- Whenever Css or js files changes, put hash into the file name for cache busting.
- ...Related to previous step, go through all templates and update urls everywhere they were generated.
- ...remove old hashed files.
- Minify, and generate Source Maps.
So Compile/Transpile Files, Live/Hot Reload, Hash Filenames, minify, and sourcemaps.
Right now I am thinking of abandoning Webpack, and only use it for transpiling and do everything in Gulpjs.
stuff in bold is where I had a lot of trouble as well. Existing Solutions include generating JSON file, and reading them per request (inefficent!), generating full html file and injecting them (breaks many flows plus cant modify script tag with special attributes if needed, they get written over).
via Muhammad Umer
No comments:
Post a Comment