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

Invalid CSS after "module.exports" #4

Open
mascardoso opened this issue Dec 13, 2017 · 0 comments
Open

Invalid CSS after "module.exports" #4

mascardoso opened this issue Dec 13, 2017 · 0 comments

Comments

@mascardoso
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant