Skip to content

Remove gulp and upgrade webpack#2748

Merged
frjo merged 14 commits intomainfrom
remove-gulp-and-upgrade-webpack
Mar 16, 2022
Merged

Remove gulp and upgrade webpack#2748
frjo merged 14 commits intomainfrom
remove-gulp-and-upgrade-webpack

Conversation

@vimal1083
Copy link
Copy Markdown
Contributor

@vimal1083 vimal1083 commented Feb 28, 2022

Fixes #2699
Fixes #2689

Add description here.

@vimal1083 vimal1083 force-pushed the remove-gulp-and-upgrade-webpack branch from 6aa7e03 to eff19a5 Compare February 28, 2022 06:40
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 28, 2022

Codecov Report

Merging #2748 (4dd309b) into main (b7b70cd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2748   +/-   ##
=======================================
  Coverage   81.70%   81.70%           
=======================================
  Files         657      657           
  Lines       23945    23945           
=======================================
  Hits        19564    19564           
  Misses       4381     4381           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7b70cd...4dd309b. Read the comment docs.

@vimal1083 vimal1083 marked this pull request as draft February 28, 2022 14:09
Comment thread docker/Dockerfile.dev Outdated
@vimal1083
Copy link
Copy Markdown
Contributor Author

Having some issues in upgrading webpack dev server and saas-loader. working on it

@vimal1083 vimal1083 force-pushed the remove-gulp-and-upgrade-webpack branch 4 times, most recently from b05a644 to 6997240 Compare March 2, 2022 14:27
@vimal1083
Copy link
Copy Markdown
Contributor Author

  • For production deployment, we continue to use npm run heroku-postbuild.
  • Backend Developer, who don't update react code while development can run npm run dev:build once (similar to production command, runs and finishes immediately. does not watch javascript files)
  • Front end developers can use npm run watch, it will watch for javascript changes

cc: @frjo

@vimal1083 vimal1083 marked this pull request as ready for review March 2, 2022 14:33
@vimal1083 vimal1083 marked this pull request as draft March 2, 2022 14:38
@vimal1083 vimal1083 marked this pull request as ready for review March 2, 2022 14:41
@frjo
Copy link
Copy Markdown
Member

frjo commented Mar 3, 2022

Nice work!

We are missing some pieces however:

  1. A watch command with sourcemaps and linting for CSS. This makes CSS development so much easier.
  2. The watch command only watch the react app files. The apply/public javascript files do get rebuilt but only after a react app file has been touched.
  3. The JavaScript production build is missing the "babel" and "uglify" steps. Or are you arguing that they are not needed? I'm always happy to remove stuff when possible.

Copy link
Copy Markdown
Member

@sandeepsajan0 sandeepsajan0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked well for me as a backend developer with npm run dev:build and npm run watch commands.

@vimal1083
Copy link
Copy Markdown
Contributor Author

  1. A watch command with sourcemaps and linting for CSS. This makes CSS development so much easier.
    • Added source maps for CSS in dev build
  2. The watch command only watch the react app files. The apply/public javascript files do get rebuilt but only after a react app file has been touched.
    • Added now, but HMR will not recognize the changes as these files are not part of react app, so the user has to refresh the browser to see the changes. I guess we had the same problem while using gulp.
  3. The JavaScript production build is missing the "babel" and "uglify" steps. Or are you arguing that they are not needed? I'm always happy to remove stuff when possible.
    • We still use 'babel' in our webpack files, it helps us to transpile the ES6 javascript. Added TerserPlugin in webpack production file, it will mangle and compress the final Js output. We can have it. It adds an additional level of difficulty for others to read the javascript source code from prod build file.

cc: @frjo

@frjo
Copy link
Copy Markdown
Member

frjo commented Mar 7, 2022

@vimal1083 What do you think about the additions I have made to this PR?

  1. Used "concurrently" and "nodemon" to implement watch commands for css and collectstatic.
  2. Removed "babel-core", "node-sass-import-once" and "webpack-stream" since it seems they are not used anymore?
  3. Updated "babel-jest" and "@svgr/webpack" to make "npm audit" a bit happier. Down to 5 critical.
  4. Removed the "TerserPlugin", we do not need to obfuscate the js, this is open source.

Do you see any issues or things that need improvements?

@frjo frjo force-pushed the remove-gulp-and-upgrade-webpack branch from a2882fa to 87ce15f Compare March 8, 2022 08:23
@vimal1083
Copy link
Copy Markdown
Contributor Author

vimal1083 commented Mar 14, 2022

I have seen your changes all of them looking good to me. Sorry for the delay

@frjo frjo added Type: Maintenance Type: Minor Minor change, used in release drafter labels Mar 16, 2022
@frjo frjo merged commit acc5d17 into main Mar 16, 2022
@frjo frjo deleted the remove-gulp-and-upgrade-webpack branch March 18, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Maintenance Type: Minor Minor change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update webpack, webpack-dev-server etc. to latest versions Replace Gulp with something more updated, gulp relies on to many outdated packages

3 participants