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

CSS imports are undefined #60

Open
mattoni opened this issue Sep 12, 2016 · 3 comments
Open

CSS imports are undefined #60

mattoni opened this issue Sep 12, 2016 · 3 comments

Comments

@mattoni
Copy link

mattoni commented Sep 12, 2016

I'm working with the static website generator plugin (https://github.com/markdalgleish/static-site-generator-webpack-plugin) and React. Normally I don't have any problem with this but I can't figure out what's happening this time.

I've got the following loaders :

            { test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]") },
            { test: /\.scss$/, loader: ExtractTextPlugin.extract("style-loader", "css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]!sass") },

and of course the plugin:

    plugins: [
        new ExtractTextPlugin("css/[name].css"),

in my webpack config. This generates the files correctly. However, when the static website plugin does its thing to generate the HTML:

import styles from "./styles.scss";

console.log(styles);

styles ends up being undefined, despite having generated the correct files.

Am I missing something here? Can provide more info if needed.

Thanks!

@rossthedevigner
Copy link

@mattoni Did you ever come up with a solution? I'm using stylus-loader for mine, but I think I'm running into the same issue.

@dvidsilva
Copy link

@mattoni @rossthedevigner Any luck, I'm having issues with my styles and no luck so far.

@mattoni
Copy link
Author

mattoni commented Nov 25, 2017

Unfortunately no I never did. I'm using Fusebox now and haven't really looked back.

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

3 participants