🌜
🌞
babel-preset-beidou-client

babel-preset-beidou-client

v2.1.0

Babel preset for Beidou Client.

npm install babel-preset-beidou-client

README

babel-preset-beidou-client

This preset includes the following plugins:

  • @babel/preset-env
  • @babel/preset-react
  • @babel/preset-typescript [optional]
  • @babel/plugin-proposal-function-sent
  • @babel/plugin-proposal-decorators
  • @babel/plugin-proposal-class-properties
  • @babel/plugin-proposal-export-namespace-from
  • @babel/plugin-proposal-numeric-separator
  • @babel/plugin-proposal-throw-expressions
  • babel-plugin-add-module-exports
  • react-hot-loader/babel [only for dev]

Install

Install the preset

npm install --save-dev babel-preset-beidou-client

Configuration

This preset support dynamic compile browser targets, set browserslist in your package.json

{
  "browserslist": ["> 1%", "last 2 versions"]
}

Or using default browserslist ['>1%', 'last 4 versions', 'not ie < 9'].

Config in .babelrc

{
  "presets": [["babel-preset-beidou-client", { "typescript": true }]]
}

Options

  • typescript: enable typescript
  • env: config passed to preset-env

Release Notes

1.0.0
By Qing • Published on March 23, 2018

BREAKING CHANGE

  • Node version must >= 8
  • React/react-dom versions must >= 16
  • Replace koa-webpack-dev-middleware with webpack-dev-server
  • Remove app.helper.resolveResource, use app.helper.asset instead

Features

  • Upgrade to [email protected], support async/await style middlewares
  • All in one manage tool - beidou-cli, including init boilerplate, development, debug, test, build assets, start/stop production app, and so on.
  • Custom view rendering process by view middlewares
  • Support rax isomorphic rendering, see beidou-view-rax
  • Webpack support many frontend resource loaders, see code
  • Webpack support CSS Modules with .module.{css|scss|less} files
  • Dump webpack config to [root]/run directory
  • Custom babel client targets by configuration
  • Handle many reasonable default configs, you may not need a lot of options in your config files, see examples

General

License
MIT
Typescript Types
None found
Tree-shakeable
No

Popularity

GitHub Stargazers
2,732
Community Interest
3,112
Number of Forks
280

Maintenance

Commits
11/2110/2202
Last Commit
Open Issues
15
Closed Issues
127
Open Pull Requests
36
Closed Pull Requests
56

Versions

Versions Released
11/2110/2201
Latest Version Released
Apr 26, 2019
Current Tags
latest2.1.0
next2.0.0-beta.0

Contributors

njugray
njugray
Commits: 221
weichunpeng
weichunpeng
Commits: 162
devrsi0n
devrsi0n
Commits: 86
justquanyin
justquanyin
Commits: 26
ahungrynoob
ahungrynoob
Commits: 9
xdlrt
xdlrt
Commits: 2
JacksonTian
JacksonTian
Commits: 2
olivewind
olivewind
Commits: 1
fantasyroot
fantasyroot
Commits: 1
chenmingjia
chenmingjia
Commits: 1
lanqy
lanqy
Commits: 1
weihomechen
weihomechen
Commits: 1
xiangxingchen
xiangxingchen
Commits: 1
davidnotes
davidnotes
Commits: 1
kittBoy
kittBoy
Commits: 1