chemiadel / next-remove-imports

The default behavior is to remove all .less/.css/.scss/.sass/.styl imports from all packages in node_modules.

Home Page:https://uiwjs.github.io/next-remove-imports/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

next-remove-imports

NPM Downloads Build & Deploy

This is a plugin for nextjs. The default behavior is to remove all .less/.css/.scss/.sass/.styl imports from all packages in node_modules.

⚠️ CSS Imported by a Dependency #52

Install

npm install next-remove-imports
# or
yarn add next-remove-imports

Usage

// next.config.js
const removeImports = require('next-remove-imports')({
  options: { },
})
module.exports = removeImports()
// next.config.js
const removeImports = require('next-remove-imports')()
module.exports = removeImports({
  webpack(config, options) {
    return config
  },
})
// next.config.js
const removeImports = require('next-remove-imports')({
  test: /node_modules([\s\S]*?)\.(tsx|ts|js|mjs|jsx)$/,
  matchImports: "\\.(less|css|scss|sass|styl)$"
})

module.exports = removeImports({
  webpack(config, options) {
    return config
  },
})

License

Licensed under the MIT License.

About

The default behavior is to remove all .less/.css/.scss/.sass/.styl imports from all packages in node_modules.

https://uiwjs.github.io/next-remove-imports/

License:MIT License


Languages

Language:JavaScript 100.0%