The css sourceMap not work
See original GitHub issueDescribe the bug
I open sourceMap option both in vite.config.js and postcss.config.js, but the sourceMap did not work.What’s more,the style property cannot be edited in dev tools.
// postcss.config.js
module.exports = {
map: 'inline',
plugins: {
'postcss-preset-env': {
stage: 2,
preserve: false,
features: {
'nesting-rules': false,
'custom-selectors': true,
'custom-properties': true,
'system-ui-font-family': true,
'environment-variables': true,
'overflow-property': true,
'place-properties': true,
},
autoprefixer: {},
importFrom: [
'./src/assets/css/_var.css',
],
exportTo: ['./src/assets/css/_var.mjs'],
},
'postcss-nested': {},
},
}
// vite.config.js
const path = require('path')
module.exports = {
alias: {
'/@/': path.resolve(__dirname, 'src'),
'/pages/': path.resolve(__dirname, 'src/pages'),
'/assets/': path.resolve(__dirname, 'src/assets'),
},
sourcemap: true,
}
Reproduction
no Link
System Info
- required
vite
version: vite@1.0.0-rc.1 - required Operating System: macos 10.13.xx
- required Node version: v12.18.2
- Optional:
- yarn version 1.22.4
- Installed
vue
version (vue@3.0.0-rc.2) - Installed
@vue/compiler-sfc
(@vue/compiler-sfc@3.0.0-rc.2)
Logs (Optional if provided reproduction)
no logs
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Chrome not loading CSS source maps? - Stack Overflow
Make sure that CSS maps are enabled in Dev tools settings. · Check the end of CSS file whether it contains a link...
Read more >4 Reasons Why Your Source Maps are Broken - Sentry Blog
4 Reasons Why Your Source Maps are Broken · Missing or incorrect source map directive · Missing original source files · Bad source...
Read more >CSS sourcemaps working in Chrome but not in Firefox? - sage
Hi all, Using a fresh install of Bedrock and Sage, 1.12.6 and 9.0.9, I've just noticed that in Firefox my sourcemaps do not...
Read more >Magento 2 - css source maps not working
In magento 2.4.4 I had same problem. I fixed it by downgrading to "grunt-contrib-less": "1.4.1". in package.json and running npm install ...
Read more >Solution to no CSS source map file generated under ...
The issue is in Webpack 4 under "production" mode there is no source map file generated only for CSS (no problem in javascript...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
me too!
A temp solution can be to disable verbose for warning. In most case, warnings will are not code breaker, juste a hint for optimisations! So we can disabling for work on it later , when time come ! But yes it would be nice to put up with that. It is preferable to have access to the warnings for corrections when it happens, instead rather to hide and correct them later !
@patak-js Unfortunately #659 has been closed