webpack-blocks: PostCSS block with SASS and sourceMap

Adding sass({sourceMap: true}) produces error:

TypeError: Path must be a string. Received undefined

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 30 (29 by maintainers)

Commits related to this issue

Most upvoted comments

I commented out everything unrelated and narrowed to these lines:

postcss([
    autoprefixer({browsers: ['last 2 versions']})
]),

So seems probably not SASS/LESS should have additional plugin, but postcss 😃

I’ve added the following and it fixed the issue:

    addPlugins([
        new webpack.LoaderOptionsPlugin({
            options: {
                context: '/'
            }
        }),
    ])