-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Unable to compile BluePrint v5 SCSS #6733
Comments
@JoeDuncko Along with the aforementioned Vite modifications, you'll need to use the legacy SASS svg-inliner mentioned here: Use this legacy inliner instead of the So the end result will be something like: // vite.config.js
import { sassNodeModulesLoadPaths from "@blueprintjs/node-build-scripts";
import { legacySassSvgInlinerFactory } from "./legacySassSvgInlinerFactory";
const config = ({ mode }) => {
return defineConfig({
...
css: {
devSourcemap: true,
preprocessorOptions: {
scss: {
functions: {
"svg-icon($path, $selectors: null)":
legacySassSvgInlinerFactory(
join(__dirname, "/src/icons"),
{ optimize: true, encodingFormat: "uri" }
),
},
loadPaths: sassNodeModulesLoadPaths,
},
},
},
});
};
export default config; It's my understanding that those using Vite cannot move to using the current version of the Sass inliner coming from Blueprint yet because Vite does not yet support the new compiler API that Blueprint has moved onto using: At least that's what this comment here says: #6051 (comment) |
@justinbhopper Thank you so much, that solved it and I'm able to compile the SCSS! Closing as this is solved. |
Follow up to #6051 as per #6051 (comment), as I don't think a new issue was ever created.
Environment
Steps to reproduce
I did my best to follow along with the instructions at https://blueprintjs.com/docs/#core/classes.namespacing (though, note that the scss files no longer seem to live in
/lib/scss
, but in/core/src
), along with the Vite-specific modifications at #5297 (comment) ./resources/icons
are copied to/src/icons
.Actual behavior
When running
npm run build
I get the following error:Expected behavior
I expected the SCSS files to successfully compile, with the intention to attempt to override the SCSS variables with the
@use "" with {}
syntax, as noted on #5297 (comment) .Happy to expand the above with any relevant information.
The text was updated successfully, but these errors were encountered: