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

Semicolon Crashes Webpack's Sass Loader #38

Closed
rotexhawk opened this issue Jun 2, 2018 · 3 comments
Closed

Semicolon Crashes Webpack's Sass Loader #38

rotexhawk opened this issue Jun 2, 2018 · 3 comments

Comments

@rotexhawk
Copy link
Contributor

Sass loader doesn't like it when you switch between syntax in the same file. Also for consistency it would be best to remove the semicolons here.

https://github.com/couds/react-bulma-components/blob/master/src/components/heading/heading.sass#L1
https://github.com/couds/react-bulma-components/blob/master/src/components/heading/heading.sass#L2

@rotexhawk rotexhawk changed the title Semicolon Crashes Webpacks Sass Loader Semicolon Crashes Webpack's Sass Loader Jun 2, 2018
@couds
Copy link
Owner

couds commented Jun 4, 2018

Hi @rotexhawk you are right, I will fix this on the next release to keep the sass consistent. however the webpack sass loader should work, can you post the configuration you are using?

@couds
Copy link
Owner

couds commented Jun 4, 2018

Fixed on eb6d991

@couds couds closed this as completed Jun 4, 2018
@rotexhawk
Copy link
Contributor Author

rotexhawk commented Jun 23, 2018

@couds thank you for fixing that. Yeah I am not sure what's going on. I am using react-create-app and here is my webpack setup. Sass Loader is not working properly.

{
    test: /\.(sass|scss|css)$/,
    use: [
        require.resolve('style-loader'),
        {
            loader: require.resolve('css-loader'),
            options: {
                importLoaders: 1,
            },
        },
        {
            loader: require.resolve('sass-loader'),
        },
        {
            loader: require.resolve('postcss-loader'),
            options: {
                // Necessary for external CSS imports to work
                // https://github.com/facebookincubator/create-react-app/issues/2677
                ident: 'postcss',
                plugins: () => [
                    require('postcss-flexbugs-fixes'),
                    autoprefixer({
                        browsers: [
                            '>1%',
                            'last 4 versions',
                            'Firefox ESR',
                            'not ie < 9', // React doesn't support IE8 anyway
                        ],
                        flexbox: 'no-2009',
                    }),
                ],
            },
        },
    ],
}

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

2 participants