Skip to content

Conversation

Athorcis
Copy link

Hello,

this PR adds an option named implementation to allow the selection of dart sass when using sass-extract@3.0.0

@boycce
Copy link

boycce commented Apr 8, 2024

Are you able to provide a guide on how to use this PR?

@Athorcis
Copy link
Author

Athorcis commented Apr 9, 2024

@boycce
You just have to use the implementation option of the loader, one example could be :

import * as sass from 'sass';

webpackConfig.module.rules.push({
    test: /\.scss$/,
    resourceQuery: /[?&]extract-variables=true(&|$)/,
    loader: 'sass-extract-loader',
    enforce: 'pre',
    options: {
        // We have to pass a copy of the sass object
        // because the original is frozen and sass-extract
        // tries to modify it
        implementation: {...sass}
    }
    type: 'javascript/auto',
});

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

Successfully merging this pull request may close these issues.

2 participants