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

feat: support webpack hmr #947

Merged
merged 1 commit into from May 7, 2022
Merged

feat: support webpack hmr #947

merged 1 commit into from May 7, 2022

Conversation

aliuq
Copy link
Contributor

@aliuq aliuq commented May 7, 2022

webpack hmr not works because of the css placeholder text is not changed, this pr added the content hash value to prepend the layer placeholder.

because the webpack source code string escapes the double quotes, hash content regx needs add \\ to match the code

In webpack v5, need set cache: false, I don't know if there is any other better way, a small problem is that sometimes you need to typing Ctrl + S twice

@aliuq aliuq requested a review from antfu as a code owner May 7, 2022 18:17
@netlify
Copy link

netlify bot commented May 7, 2022

Deploy Preview for unocss canceled.

Name Link
🔨 Latest commit 5042504
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/6276b7bcf561850009d91969

@antfu antfu merged commit 1d52e8f into unocss:main May 7, 2022
@aliuq aliuq deleted the webpack-hmr branch May 7, 2022 20:13
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