Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

next-plugin-less

mengfei005368MIT1.0.2TypeScript support: included

Use Antd Or Library like Antd (with Less) with Next.js.

next, nextjs, next.js, less, less plugin, antd, ant design, antd plugin, plugin, css module, next plugin

readme

Next.js + Library Like Antd (with Less)

JavaScript Style Guide Build Status semantic-release

Use Antd Or Library like Antd (with Less) with Next.js.

If you use nextjs, antd and less, you may use babel-plugin-import to dynamically import less style files in antd. You can use the default configuration of this library.

If you use other libraries with similar structures and also import less style files through babel-plugin-import, then you can also use this library, just customize the configuration libsStyleRegExp to exclude server-side compilation styles.

Usage

module.exports = withLess(
  withMDX({
    /**
     * @default  "/(antd\/.*?\/style).*(?<![.]js)$/"
     * */  
    libsStyleRegExp: /(antd|other-libs)\/.*?\/style.*?/, //  Exclude libs style when compiling server
    cssLoaderOptions: {
      modules: {
        mode: "local",
        auto: (resource) => {
          if (resource.match("node_modules")) {
            return false;
          }
          if (resource.match("src")) {
            return true;
          }
          return false;
        },
      },
    },
  }),
);

changelog

1.0.2 (2021-07-08)

Documentation

  • readme.md: update readme.md (235e1c1)

1.0.1 (2021-07-08)

Continuous Integration

  • package.json,scripts/*: auto git push after release (b5e1afa)
  • project: fix github auto push (01e86a5)
  • release.config.js: remove ci='false' (facd45a)
  • release.config.js: update releaseRules (98d465e)

Bug Fixes

  • overrideWebpackConfig: fix pass in libsStyleRegExp (18e1064)

Other Changes

  • .mergify.yml: add mergify.yml (6c2d459)
  • release: 1.0.1-alpha.1 [skip ci] (5f9ea75)
  • release: 1.0.1-alpha.2 [skip ci] (a84fb52)

Performance Improvements

  • overrideWebpackConfig: plusinOptions.modules will overwrite default modules.auto (8996969)

1.0.1-alpha.2 (2021-07-08)

Continuous Integration

  • release.config.js: remove ci='false' (facd45a)

Performance Improvements

  • overrideWebpackConfig: plusinOptions.modules will overwrite default modules.auto (8996969)

1.0.1-alpha.1 (2021-07-07)

Bug Fixes

  • overrideWebpackConfig: fix pass in libsStyleRegExp (18e1064)

1.0.0 (2021-07-07)

Code Refactoring

Continuous Integration

  • .huksy, package.json: add commit-msg, pre-commit settings for huksy, lint-staged (d536af2)

Documentation

  • readme.md: add travis ci status image (ba69d0f)
  • readme.md: update (60c0ba8)

Features

  • src: add supoorts customs libs style regexp (1d8a7ec)

Other Changes

  • deps: change @semantic-release/ci to @semantic-release/github (bf3e018)
  • package.json, release.config.js: update deps, add semantic-release/git (fa4eecb)