The Problem
I am working on a website that uses webpack. I added the source folder as a Workspace on Google DevTools, and all files are mapped correctly. I can make changes on "Sources" panel on DevTools and original files are automatically updated when saved, as expected. However, changes made on "Styles" pane under "Elements" panel are ignored and doesn't update the original file. All changes are lost on page refresh.
What I tried
All below are enabled in DevTools settings. I tried toggling them on/off, restarted DevTools, to no avail.
- Preferences > ✅ Enable CSS source maps
- Experiments > ✅ Sync CSS changes in the Styles pane
I also tested the behavior on a separate non-bundled plain html/js/css website, and the changes in the styles pane updated the original file as expected.
Some info on versions:
- Chrome v119.0.6045.123
- vue.config.js
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/Prototypes/" : "/",
css: {
sourceMap: true,
extract: process.env.NODE_ENV === 'development' ? false : true,
},
configureWebpack: {
devtool: 'source-map',
},
};
Any solutions to this issue? I am a designer/coder and I find the "Styles" panel extremely vital on my projects to make css changes in a WYSIWYG fashion. Some thoughts:
- Is this a Chrome DevTools bug?
- Can I get around this by non-bundling, minimizing or source-mapping CSS files in anyway?