@koa_web/webpack

2.0.43 • Public • Published

简介

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

安装&配置

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

使用

config配置js对象

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

支持扩展webpack配置

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

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

示例

server/index.js

app.use(koaEntry(
  [ webRoot ],
  process.env.NODE_ENV === 'development' ? require('@koa_web/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"
    }
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.431latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.431
2.0.420
2.0.410
2.0.400
2.0.390
2.0.380
2.0.370
2.0.360
2.0.350
2.0.340
2.0.330
2.0.320
2.0.311
2.0.300
2.0.290
2.0.280
2.0.270
2.0.260
2.0.250
2.0.240
2.0.230
2.0.220
2.0.210
2.0.200
2.0.190
2.0.181
2.0.170
2.0.160
2.0.150
2.0.141
2.0.131
2.0.120
2.0.110
2.0.101
2.0.90
2.0.80
2.0.70
2.0.60
2.0.51
2.0.40
2.0.30
2.0.20
2.0.10
2.0.00
1.5.80

Package Sidebar

Install

npm i @koa_web/webpack

Weekly Downloads

7

Version

2.0.43

License

MIT

Unpacked Size

20.6 kB

Total Files

15

Last publish

Collaborators

  • jiang111