Webpack missconfiguration when renaming .css to .scss

"@roots/bud": "6.4.0",
"@roots/bud-eslint": "^6.4.0",
"@roots/bud-sass": "^6.4.0",
"@roots/bud-tailwindcss": "6.4.0",
"@roots/eslint-config": "^6.4.0",
"@roots/sage": "6.4.0"

I’ve installed bud-sass. When I change app.css and editor.css names to app.scss and editor.scss I get this error when yarn build (twice. One for each file):

Error: resolve-url-loader: webpack misconfiguration
   webpack or the upstream loader did not supply a source-map

Captura de pantalla 2022-09-18 a las 14.06.26

1 Like

What’s your .stylelintrc look like? I’m using a similar setup with this:

{
  "extends": [
    "@roots/bud-sass/stylelint-config",
    "@roots/sage/stylelint-config",
    "@roots/bud-tailwindcss/stylelint-config/scss"
  ],
  "rules": {
    "declaration-bang-space-before": null
  }
}

The order in which the configs are loaded matters, and this is what got it up and running for me. :crossed_fingers:

1 Like

Same here :upside_down_face:

{
  "extends": [
    "@roots/bud-sass/stylelint-config",
    "@roots/sage/stylelint-config",
    "@roots/bud-tailwindcss/stylelint-config/scss"
  ],
  "rules": {
    "at-rule-no-unknown": null,
    "scss/at-rule-no-unknown": true,
    "no-eol-whitespace": null,
    "block-closing-brace-newline-before": null,
    "block-no-empty": null,
    "declaration-block-no-redundant-longhand-properties": null
  }
}

Provisional fix

app.hooks.action(`build.before`, async app =>
  app.build.items.sass.setOptions({ sourceMap: true })
);
1 Like