When using the server (with or without HMR), it doesn't recognize styles in <style> block within a Vue template. This problem is within HMR, but style changes are also not picked up when doing a manual refresh in the browser.
No .babelrc. I'm using the vue template compiler feature of Parcel. I've got a mini test repo here.
{
...
"scripts": {
"build": "parcel build src/index.html --public-url .",
"serve": "parcel src/index.html"
},
"devDependencies": {
"@vue/component-compiler-utils": "^2.0.0",
"node-sass": "^4.9.0",
"parcel-bundler": "^1.9.3",
"vue-template-compiler": "^2.5.16"
},
"dependencies": {
"vue": "^2.5.16",
"vue-hot-reload-api": "^2.3.0",
"vue-router": "^3.0.1"
},
"alias": {
"vue": "./node_modules/vue/dist/vue.common.js"
}
}
npm install to set up the appnpm run build.src/Home.vue and add some styles in the <style> block at the bottom.npm run build again. Those styles will be reflected in the built page. npm run serve and open localhost:1234npm run build again, your new styles _do_ show up. While running serve, when modifying the styles within the <style> block in a Vue template, those styles should immediately be reflected in what the Parcel server outputs.
In order to get the styles to be reflected in the app, I have run the build command. Then all works as expected. However, when running the serve command, changes to those styles are not picked up.
Example mini repo: https://gitlab.com/jake.paris/parcel-bugtest
I'm using Parcel 1.93, npm, on a Mac.
I'm running into this exact same thing. I'm relieved to discover that this is a known bug, since I'm new to Parcel and I thought I might be doing something wrong.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.
Most helpful comment
I'm running into this exact same thing. I'm relieved to discover that this is a known bug, since I'm new to Parcel and I thought I might be doing something wrong.