chore: Update webpack scripts and script loading strategy
Created by: leoendless
Signed-off-by: leoliu leoliu@yunify.com
What type of PR is this?
/kind update
What this PR does / why we need it:
- Refactor scripts loading strategy. Using manifest.json to generate the scripts and styles list in the index.html.
- Reduce dev servers by replacing
webpack-dev-server
withwebpack-dev-middleware
. Theconcurrently
package may cause OOM error when developing with "concurrently -k --raw "yarn dev:client" "yarn dev:server"". - Use
hard-source-webpack-plugin
to speed the webpack build process in dev mode. - Remove unuse webpack alias which is covered by resolve.modules.
Which issue(s) this PR fixes:
Fixes #
Special notes for reviewers:
Additional documentation, usage docs, etc.: