Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Webpack hot module reload & devserver setup #2713

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

peterzen
Copy link
Member

This PR adds webpack hot module reload (HMR) config to hot reload CSS.

To use, run

npm run dev

This starts webpack DevServer on port 9000. Changes to CSS file are hot reloaded.

@buck54321
Copy link
Member

I'm confused. This causes my browser to auto-reload every time I make a change to js or css? Is that desirable? What else does this offer over the npm run watch script?

@peterzen
Copy link
Member Author

I'm confused. This causes my browser to auto-reload every time I make a change to js or css? Is that desirable? What else does this offer over the npm run watch script?

This is for hot reloading CSS, when you update the SCSS it applies the changes without reloading the page. It's a byproduct of the consolidation work, quite useful when working on dialogs etc.

Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

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

Appears to add vulnerabilities:

$ npm audit
# npm audit report

express  <4.19.2
Severity: moderate
Express.js Open Redirect in malformed URLs - https://github.com/advisories/GHSA-rv95-896h-c2vc
fix available via `npm audit fix`
node_modules/express

follow-redirects  <=1.15.5
Severity: moderate
follow-redirects' Proxy-Authorization header kept across hosts - https://github.com/advisories/GHSA-cxjh-pqwp-8mfp
fix available via `npm audit fix`
node_modules/follow-redirects

webpack-dev-middleware  7.0.0
Severity: high
Path traversal in webpack-dev-middleware - https://github.com/advisories/GHSA-wr3j-pwj9-hqq6
fix available via `npm audit fix`
node_modules/webpack-dev-middleware

3 vulnerabilities (2 moderate, 1 high)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants