next-with-vendor

0.0.1 • Public • Published

Next.js vendor

next 打包时生成vendor文件

Installation

npm install --save-dev next-with-vendor

or

yarn add next-with-vendor

Usage

// next.config.js
const withVendor = require('next-with-vendor')

module.exports = withVendor({
    // 需要打入vendor里的第三方依赖
    vendors: [
        'axios',
        'classnames',
        'lodash',
        'next',
        'react',
        'react-dom',
        'mobx',
        'mobx-react',
        '...'
    ],
    splitMinChunks:3   // 最小拆包引用数,默认为3
});

Readme

Keywords

none

Package Sidebar

Install

npm i next-with-vendor

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • lueklee