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

Is it possible to scope files by default? #87

Open
ghost opened this issue Sep 19, 2023 · 0 comments
Open

Is it possible to scope files by default? #87

ghost opened this issue Sep 19, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 19, 2023

Is there a config with .bablerc and webpack.config.js that can scope .(sa|sc|c)ss$ files by default and exclude files with a prefix like: .global.(sa|sc|c)ss$.

I've tried:
.babelrc:

{
  "plugins": [
    [
      "babel-plugin-react-scoped-css",
      {
        "include": ".scss$"
      }
    ]
  ]
}

webpack.config.js:

{
  test: /\.scss$/,
  use: [
    {
      loader: 'style-loader',
    },
    {
      loader: 'css-loader',
      options: {
        sourceMap: true,
        importLoaders: 2,
      },
    },
    { loader: 'scoped-css-loader' },
    {
      loader: 'sass-loader',
    },
  ],
},

But get these errors when running: SassError: Selector "[data-v-ee483fea]" can't have a suffix

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

0 participants