Open
Description
Normally when saving a global CSS file in Nuxt the styles are updated via a "hot reload." However, when using the @nuxt/postcss8
module this does not happen and the web page is fully reloaded instead.
Reproduction
- Clone https://github.com/bradlc/nuxt-postcss8-bug
- Run
npm install
- Run
npm run dev
- Change the background color in
assets/css/main.css
- Notice that the web page does a full reload instead of a hot reload
Warnings logged in the browser when updating the CSS file
Ignored an update to unaccepted module ./node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js?!./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js?!./assets/css/main.css -> ./assets/css/main.css -> ./.nuxt/App.js -> ./.nuxt/index.js -> ./.nuxt/client.js -> 0
[HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See https://webpack.js.org/concepts/hot-module-replacement/ for more details.
[HMR] - ./node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js??ref--3-oneOf-1-2!./assets/css/main.css
[HMR] Reloading page
Metadata
Metadata
Assignees
Labels
No labels