An Interest In:
Web News this Week
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
- March 24, 2024
- March 23, 2024
January 18, 2022 04:09 am GMT
Original Link: https://dev.to/smac89/quickest-method-to-cause-webpack-to-recompile-your-file-1l4e
Quickest method to have webpack recompile your files
Just today I started noticing that when my react code rebuilds, I get eslint errors in the console, but not in my IDE.
Even stranger was the fact that when I run eslint
by itself in the commandline, it doesn't show that anything was wrong:
eslint --cache --format stylish --ext '.js,.jsx,.ts,.tsx' --quiet ./
What gives?
The solution
touch
command to the rescue. In order to force webpack to recompile the files, they had to be changed somehow, and I wasn't prepared to manually change each file by hand, recompile, and revert the change, just to wait for another recompilation.
I simply used the touch
command on Linux to "touch" all the files which were having that problem, like so:
touch src/pages/**/*.{js,jsx,tsx,ts}
shell is zsh
After running this command, webpack was forced to recompile everything and I no longer saw those pesky errors again.
Original Link: https://dev.to/smac89/quickest-method-to-cause-webpack-to-recompile-your-file-1l4e
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To