- Use dart-sass instead of node-sass
- Use sass builtin modules instead of global functions
- Fixed @mixin parse warning
- Fixed @function splice recursive error
npm i sass-bem-next --save-dev
Vue CLI
v5.x
// vue.config.js
module.exports = {
css: {
loaderOptions: {
scss: {
additionalData: `@import "sass-bem-next";`
}
}
}
}
v4.x
module.exports = {
css: {
loaderOptions: {
scss: {
prependData: `@import "sass-bem-next";`,
sassOptions: {
includePaths: ['node_modules']
}
}
}
}
}
Vite
// vite.config.ts
import { defineConfig } from 'vite'
export default defineConfig({
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "sass-bem-next";`
}
}
}
})
The sass-bem-next package is also open-sourced software licensed under the MIT license.