81 Star 235 Fork 67

GavinZhulei/advanceback

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
var webpack = require('webpack');
var path = require("path");
// var ExtractTextPlugin = require("extract-text-webpack-plugin");
var debug = true;
module.exports = {
entry:{
'demo.index': ['webpack/hot/dev-server','./demo/dev/index.js'],
'demo.login': ['webpack/hot/dev-server','./demo/dev/login.js']
},
output: {
path: path.join(__dirname, 'bundle'),
publicPath: debug ? '../bundle/' : 'resource/',
filename: '[name].js',
chunkFilename: '[id].js',
},
resolve:{
extensions:['', '.js', '.jsx', 'css', 'vue']
},
module:{
loaders:[
{
test: /\.vue$/,
loader: 'vue-loader',
},
{
test: /\.js$/,
exclude: /node_modules|vue\/src|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
loader: 'babel-loader'
},{
test: /\.css$/,
//loader: ExtractTextPlugin.extract("style-loader", "css-loader")
loader: 'style-loader!css-loader'
},{
test: /\.scss$/,
//loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader")
loader: 'style-loader!css-loader!sass-loader'
},{
test: /\.(png|jpg|gif|JPG)$/,
loader: 'url-loader?limit=8192'
},{
test: /\.woff/,
loader: 'url-loader?limit=10000&minetype=application/font-woff'
},{
test: /\.ttf/,
loader: 'file-loader'
},{
test: /\.eot/,
loader: 'file-loader'
},{
test: /\.svg/,
loader: 'file-loader'
},{
test:/\.html$/,
loader:'html-loader'
}
]
},
babel: {
presets: ['es2015', 'stage-2'],
plugins: ['transform-runtime']
},
plugins:[
new webpack.HotModuleReplacementPlugin()
]
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/gavinzhulei/advanceback.git
[email protected]:gavinzhulei/advanceback.git
gavinzhulei
advanceback
advanceback
master

搜索帮助