
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@zeit/next-sass
Advanced tools
Import .scss
and .sass
files in your Next.js project
npm install --save @zeit/next-sass node-sass
or
yarn add @zeit/next-sass node-sass
Create a next.config.js
in your project
// next.config.js
const withSass = require('@zeit/next-sass')
module.exports = withSass()
Create a Sass file styles.scss
$font-size: 50px;
.example {
font-size: $font-size;
}
Create a page file pages/index.js
import "../styles.scss"
export default () => <div className="test">Hello World!</div>
// next.config.js
const withSass = require('@zeit/next-sass')
module.exports = withSass({
cssModules: true
})
Create a Sass file styles.scss
$font-size: 50px;
.example {
font-size: $font-size;
}
Create a page file pages/index.js
import css from "../styles.scss"
export default () => <div className={css.example}>Hello World!</div>
Create a next.config.js
in your project
// next.config.js
const withSass = require('@zeit/next-sass')
module.exports = withSass()
Create a postcss.config.js
module.exports = {
plugins: {
// Illustrational
'postcss-css-variables': {}
}
}
Create a CSS file styles.scss
the CSS here is using the css-variables postcss plugin.
:root {
--some-color: red;
}
.example {
/* red */
color: var(--some-color);
}
When postcss.config.js
is not found postcss-loader
will not be added and will not cause overhead.
Optionally you can add your custom Next.js configuration as parameter
// next.config.js
const withCSS = require('@zeit/next-sass')
module.exports = withCSS({
webpack(config, options) {
return config
}
})
FAQs
Import `.sass` or `.scss` files in your Next.js project
The npm package @zeit/next-sass receives a total of 7,368 weekly downloads. As such, @zeit/next-sass popularity was classified as popular.
We found that @zeit/next-sass demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.