Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
next-compose
Advanced tools
Compose next-plugins in a simple way
npm install -D next-compose
or
yarn add -D next-compose
Simple example with TypeScript and Sass plugins:
const withTS = require('@zeit/next-typescript')
const withSass = require('@zeit/next-sass')
const compose = require('next-compose')
const tsConfig = {/** ts config here */}
const sassConfig = {/** sass config here */}
module.exports = compose([
[withTS, tsConfig],
[withSass, sassConfig],
{
webpack: (config) => {
/**some special code */
return config
}
}
])
Example with build vendor.css
and app.css
from different input extensions:
const webpack = require('webpack')
const withSass = require('@zeit/next-sass')
const withSass = require('@zeit/next-less')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const commonsChunkConfig = require('@zeit/next-css/commons-chunk-config')
const compose = require('./scripts/next-compose')}
const extractVendorCSSPlugin = new ExtractTextPlugin('static/vendor.css')
const extractAppCSSPlugin = new ExtractTextPlugin('static/app.css')
module.exports = compose([
[withLess, {
cssLoaderOptions: { modules: false },
lessLoaderOptions: { /** less loader options */ },
extractCSSPlugin: extractVendorCSSPlugin
}],
[withSass, {
cssLoaderOptions: {
modules: true,
localIdentName: '[local]-[hash:base64:5]',
},
sassLoaderOptions: { /** sass loader options */ },
extractCSSPlugin: extractAppCSSPlugin,
}],
{
webpack(config, options) {
config.plugins.push(extractVendorCSSPlugin)
config.plugins.push(extractAppCSSPlugin)
if (!options.isServer) {
config = commonsChunkConfig(config, /\.(less|scss|sass)$/)
}
return config
}
}
])
FAQs
Compose NextJs plugins in a simple way
The npm package next-compose receives a total of 981 weekly downloads. As such, next-compose popularity was classified as not popular.
We found that next-compose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.