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

Vue loader does not include simple css styles #12

Open
perminov-aleksandr opened this issue Aug 6, 2019 · 1 comment
Open

Vue loader does not include simple css styles #12

perminov-aleksandr opened this issue Aug 6, 2019 · 1 comment
Labels
bug Something isn't working Hacktoberfest

Comments

@perminov-aleksandr
Copy link

perminov-aleksandr commented Aug 6, 2019

Let's say we have initial webpack.config.js where options of vue-loader specified as:

{
    test: /\.vue$/,
    loader: "vue-loader",
    options: {
        preserveWhitespace: false,
        loaders: {
            scss: "vue-style-loader!css-loader!sass-loader", // <style lang="scss">
            sass: "vue-style-loader!css-loader!sass-loader?indentedSyntax" // <style lang="sass">
        }
    }
}

and in VueApp/idontneedtypescript/App.vue styles specified without lang="scss":

<style scoped>
    .custom-class {
        background: red;
    }
</style>

Then vue-loader does not include simple css styles in extracted css file in wwwroot/dist/css/main.css.

@danijelh danijelh added the bug Something isn't working label Aug 10, 2019
@danijelh
Copy link
Owner

danijelh commented Aug 10, 2019

Hello,

I can confirm that this is indeed an issue.
Styles added in the <style scoped> block are not included correctly and therefore do not work.

CURRENT WORKAROUND: Put your style in any .css file and simply import it, it will work as intended.

I will update the webpack configuration in the coming days.

Thank you for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants