question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The css sourceMap not work

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:15
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
djmisterjoncommented, Apr 19, 2021

me too! image

A temp solution can be to disable verbose for warning. image 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 !

1reaction
piotr-czcommented, Apr 7, 2021

@patak-js Unfortunately #659 has been closed

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found