Lean-obsolete | Obsoleted App of Lean OpenWrt
kandi X-RAY | Lean-obsolete Summary
kandi X-RAY | Lean-obsolete Summary
Obsolete Apps of Lean OpenWrt.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Lean-obsolete
Lean-obsolete Key Features
Lean-obsolete Examples and Code Snippets
Community Discussions
Trending Discussions on Lean-obsolete
QUESTION
I have an issue with webpack build times in my react application. Everything builds fine but it takes a long time.
Even I change just the JavaScript files the CSS rebuilds?
Also the CSS compilation is taking a longer than I think it should be (correct me if I am wrong)?
I am running a Core i7 with 16gb of Ram and the build is taking about a minute which is becoming very annoying during development when it's a one line change and you have to wait near enough a minute before you can see your changes in the browser?
Is this the wrong approach?
...ANSWER
Answered 2018-Oct-27 at 08:53As discussed in the comments, here are the most obvious changes you could make to speed up your build:
UglifyJsPlugin
andExtractTextPlugin
are very heavy in terms of their impact on your compilation time, while not actually presenting many tangible benefits in development. Checkprocess.env.NODE_ENV
in your config script, and enable/disable them depending on whether you're doing a production build or not.- In place of
ExtractTextPlugin
, you can usestyle-loader
in development to inject CSS into the head of the HTML page. This can cause a brief flash of unstyled content (FOUC) when the page loads, but is much quicker to build.
- In place of
- If you're not already, use
webpack-dev-server
rather than just running Webpack in watch mode - using the dev server compiles the files in memory instead of saving them to disk, which further decreases the compile times in development.- This does mean you'll have to manually run a build when you want to have the files written to disk, but you'll need to do that to switch to your production config anyway.
- Not sure if this has any impact on performance, but the
resolve
section of your config doesn't meaningfully differ from the defaults, and you should be able to remove it without causing any issues.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Lean-obsolete
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page