Static GitHub Issues

[268] sourcemaps for css/sass

prev: Page/Component specific (S)CSS export / use
next: Unable to access process.env from browser

I'm using sass in the project and all is good. However, I just realized that sourcemaps is not toggling on. I've added in the build extend area, which solved it for javascript sourcemaps but sass/css are all being sent to inline styles.

Here's my build section of nuxt.config.js

build: {
    vendor: ['axios', 'moment', 'lodash', 'fuse.js'],
    babel: {
      presets: [
        ['es2015'],
        'stage-2'
      ]
    },
    extend (config, {isClient}) {
      if (isClient) {
        config.devtool = 'eval-source-map'
      }
    },
    loaders: [
      {
        test: /\.scss$/,
        loaders: ["style", "css?sourceMap", "resolve-url", "sass?sourceMap"]
        //loaders: ["style", "css", "resolve-url", "sass?sourceMap"]
      },
      {
        test: /\.(png|jpe?g|gif|svg)$/,
        loader: 'url-loader',
        query: {
          limit: 1000, // 1KO
          name: 'img/[name].[hash:7].[ext]'
        }
      },
      {
        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
        loader: 'url-loader',
        query: {
          limit: 1000, // 1 KO
          name: 'fonts/[name].[hash:7].[ext]'
        }
      }
    ]
  }
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c231">#c231</a>)</em></sub></div>