npm

@ne_fe/webpack

1.5.5 • Public • Published

简介

webpack4配置(已含babel-loader以及babel-polyfill,postcss-loader,eslint-loader等)

安装&配置

$ npm i @ne_fe/webpack --save-dev

使用

config配置js对象

const { vue_dashboard_dev, vue_dashboard_prod, vue_h5_dev, vue_h5_prod } = require('@ne_fe/webpack');

支持扩展webpack配置

在项目执行目录下新建webpack.config.js

module.exports = {
  module: {
    ...
  },
  rule: {
    ...
  },
};

示例

server/index.js

app.use(koaEntry(
  [ webRoot ],
  process.env.NODE_ENV === 'development' ? require('@ne_fe/webpack').vue_dashboard_dev : ''
));

package.json

{
    "scripts":{
        "dev":"cross-env NODE_ENV=development node server/server.js"
    }
}
  • 生产模式

package.json

{
    "scripts":{
        "build":"ne-webpack -c vue_dashboard"
    }
}

Readme

Keywords

Package Sidebar

Install

npm i @ne_fe/webpack

Weekly Downloads

3

Version

1.5.5

License

MIT

Unpacked Size

17.9 kB

Total Files

12

Last publish

Collaborators

  • caando11
  • ne.fe
  • yong.liu
  • yuezm
  • zhouzhi