1 Star 0 Fork 169

weiqin_chen / H5DS

forked from mantou / H5DS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.dev.babel.js 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
mantou 提交于 2017-09-04 01:31 . add
import path from 'path';
import webpack from 'webpack';
import webpackMerge from 'webpack-merge';
import baseConfig from './webpack.config.base';
const PORT = 8000; // 服务器端口
const HOST = '0.0.0.0'; // '127.0.0.1';
export default webpackMerge(baseConfig, {
devtool: 'cheap-source-map',
plugins: [
// 出错不终止插件
new webpack.NoEmitOnErrorsPlugin(),
// 配置全局变量
new webpack.DefinePlugin({
__DEV__: true
})
// new webpack.HotModuleReplacementPlugin()//热加载插件
],
devServer: { // 服务器
host: HOST,
port: PORT,
inline: true,
// hot: true,
historyApiFallback: true, // using html5 router.
contentBase: path.join(__dirname, 'build'),
watchOptions: {
aggregateTimeout: 300
},
proxy: {
'/': {
target: 'http://localhost:8090',
changeOrigin: true
// pathRewrite: {
// '^/api': ''
// }
}
}
}
});
JavaScript
1
https://gitee.com/weiqin_chen/H5DS.git
git@gitee.com:weiqin_chen/H5DS.git
weiqin_chen
H5DS
H5DS
master

搜索帮助