- supports ES6 in all files, whether the webpack config file or node files
-
server:
- koa + koa-router
-
database:
- mongoose
-
front-end
- react+react-router+mobx
- writing separating webpack configurations for each environment
- use
webpack-merge
to merge these configurations together
using webpack.dll to precompile third packages can decrease the compilation time efficiently.
recommend to use yarn
, because of faster speed and dependencies version management.
migrating from npm
to yarn
is easy, just replacing npm
with yarn
is OK.
yarn run start
for developmentyarn run build
for front-end assets buildingyarn run serve
for production
-
first:
yarn install
-
second:
yarn run build-dll
-
third:
development
mode:yarn start
just starts your siteproduction
mode:yarn run build-assets
to build the assets, and then runnpm run serve
to run your site
note : the yarn run build-dll
must be executed once before yarn run start
or yarn run build-assets