jest-scss-export-transform
v2.0.0
Published
Jest plugin to resolve scss exports
Downloads
451
Maintainers
Readme
jest-scss-export-transform
Jest transformer for .scss files.
Allows the :export SCSS statement to be correctly parsed in the Jest tests.
Install
npm i -D jest-scss-export-transform
or
yarn add -D jest-scss-export-transform
or
pnpm i -D jest-scss-export-transform
Add to your Jest config
Using jest.config.js
:
module.exports = {
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.scss$': [
'jest-scss-export-transform',
{
alias: {
'@style': './assets/style',
},
},
],
},
};