3 Star 2 Fork 0

gundamex/fabrickit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
gundamex 提交于 2015-09-13 22:22 . first version
/**
* Created by liubin on 2015/08/27.
*/
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: {
'app': path.resolve(__dirname, 'app/js/app.js'),
'vendor': path.resolve(__dirname, 'app/js/vendor.js')}
,
output: {
path: path.resolve(__dirname, 'project/static'),
filename: '[name].js',
publicPath: '/static/'
},
resolve: {
// 文件后缀
extensions: ['', '.js', '.jsx']
},
module: {
loaders:[
{
test: /\.jsx?$/, // 用正则来匹配文件路径,这段意思是匹配 js 或者 jsx
loader: 'babel?stage=0&optional=runtime' // 加载模块 "babel" 是 "babel-loader" 的缩写
},
{
test: /\.css$/, // Only .css files
loader: 'style!css' // Run both loaders
},
{
test: /\.less$/,
loader: 'style!css!less'
},
{
test: /\.(png|jpg)$/,
//loader: 'url?limit=25000'
loader: 'file-loader'
},
{
test: /\.(ttf|eot|svg|woff(2)?)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
//loader: 'url?limit=100000'
loader: 'file-loader'
}
]
},
node: {
net: 'empty',
dns: 'empty',
crypto: 'empty'
},
plugins: [
//new webpack.ProvidePlugin({
// 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
//}),
new webpack.optimize.CommonsChunkPlugin("common.js")
],
devtool: 'inline-source-map'
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wingzero/fabrickit.git
git@gitee.com:wingzero/fabrickit.git
wingzero
fabrickit
fabrickit
master

搜索帮助