Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The css sourceMap not work #649

Closed
luxueyan opened this issue Jul 30, 2020 · 5 comments · Fixed by #4880
Closed

The css sourceMap not work #649

luxueyan opened this issue Jul 30, 2020 · 5 comments · Fixed by #4880
Assignees
Labels
enhancement New feature or request feat: css

Comments

@luxueyan
Copy link

luxueyan commented Jul 30, 2020

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

@yyx990803
Copy link
Member

CSS source map is currently not supported.

As for devtools editing - this is a Chrome devtools issue and it's fixed in Chrome 85 (you will need to use Chrome Canary for now).

@patak-dev
Copy link
Member

@luxueyan this should be fixed by #659, if you think further changes are needed, please open a new issue against the latest version of Vite.

@piotr-cz
Copy link

piotr-cz commented Apr 7, 2021

@patak-js Unfortunately #659 has been closed

@patak-dev patak-dev reopened this Apr 7, 2021
@jonlepage
Copy link

jonlepage commented 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 !

@tjx666
Copy link

tjx666 commented Jul 21, 2021

Same when using ant design vue @djmisterjon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request feat: css
Projects
None yet
7 participants