jgranstrom / sass-extract-loader

Webpack loader for https://github.com/jgranstrom/sass-extract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid CSS after "module.exports"

mascardoso opened this issue · comments

Hi.
I keep having the issue when trying to do initial configuration on webpack, rather inlining in a JSX file.

I have the following on my webpack config to target on a specific path some scss files:

        test: /\.scss$/,
        loaders: [
          require.resolve('sass-extract-loader')
        ],
        include: paths.specificPath

and on the JSX:

import styles from './styles.scss'

class Colors extends Component {
  render () {
    console.log(styles)

and I get the error:

./styles.scss
Module build failed:
/**
             ^
      Invalid CSS after "module.exports": expected "{", was '= {"global":{"$pale'
      in styles.scss (line 1, column 15)

but if I use and ditch the webpack config:

import styles from 'sass-extract-loader!./styles.scss'

class Colors extends Component {
  render () {
    console.log(styles)

it works!
Any ideas? More info?