neverland-build

0.0.1 • Public • Published

api

参数 说明 类型 默认值
entry 需要打包的路径 array []
output 输出路径 string './dist'
context 运行目录 string process.cwd()
sourceMap 是否需要开启 sourceMap bool false
clean 打包前是否需要清空输出目录内的文件 bool false
alias alias bool or object false
dll 是否需要开启 sourceMap bool false
 
'use strict';
 
const options = {
  common: {
    entry: [],
    output: './dist',
    context: process.cwd(),
    sourceMap: false,
    clean: false,
    alias: false,
    dll: false,
    common: false,
    define: false,
    provide: false,
    react: true,
    vue: false,
    'tree-shaking': true,
    babel: {
      test: '/\\.js$/',
      exclude: ['node_modules'],
      include: [],
      options: {
        babelrc: true,
        modules: false,
        cacheDirectory: true,
        stage: true
      }
    },
    style: {
      test: '/\\.s?css$/',
      exclude: [],
      include: [],
      options: {
        extract: true,
        'style-loader': true,
        'css-loader': true,
        'postcss-loader': {
          autoprefixer: true,
          'sass-like': false
        }
      }
    },
    url: {
      test: '/\\.(png|jpg|gif)$/',
      exclude: [],
      include: [],
      options: {
        limit: 50000
      }
    },
    extensions: ['.js', '.json'],
    parallel: false
  },
  dev: {
    browsers: ['Chrome >= 50'],
    hash: false,
    minimize: false,
    watch: true
  },
  prd: {
    hash: true,
    minimize: true,
    browsers: ['Chrome >= 10', 'Safari >= 6', 'Firefox >= 5']
  }
};
 
module.exports = options;

Readme

Keywords

none

Package Sidebar

Install

npm i neverland-build

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

213 kB

Total Files

28

Last publish

Collaborators

  • chenjiahan