当前位置:首页 » JavaScript技术

[React + webpack] hjs-webpack

2015-09-06 03:13 本站整理 浏览(43)

You can easily spend hours configuring the perfect dev environment with all the latest hotness like ES6 (and *) support, hot reloading, and a myriad of other features.

webpack.config.js

var getConfig = require('hjs-webpack');

module.exports = getConfig({
    in: './src/app.js',
    out: 'dist',
    clearBeforeBuild: true
});
package.json:

"scripts": {
    "start": "webpack-dev-server",
    "build": "webpack",
    "deploy": "npm run build && surge -p dist -d somedomain.com"
  },