1 Star 0 Fork 4

牟木偶/ck_area

forked from Clake/ck_area 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
Clake 提交于 2016-10-27 03:27 . 加入新的选择控件
/**
* Created by CLAKE on 2016/8/9.
*/
var ip = require('ip');
var webpack = require('webpack');
var path = require('path');
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');
var processPlugin = new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production")
}
});
const ip_address = ip.address();
module.exports = {
//插件项
plugins: [
processPlugin
],
//页面入口文件配置
entry: {
//主文件
area : './src/app.js',
area_select: './src/select_app.js'
},
//入口文件输出配置
// output: {
// path: 'public/dist/js/page',
// filename: '[name].js'
// },
output: {
path: `${__dirname}/dist`,
filename: '[name].js'
},
module: {
//加载器配置
loaders: [
{
test: /\.less$/,
loader: 'style!css!less'
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{ test: /\.woff$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" },
{ test: /\.ttf$/, loader: "url-loader?limit=10000&mimetype=application/octet-stream" },
{ test: /\.eot$/, loader: "file-loader" },
{ test: /\.svg$/, loader: "url-loader?limit=10000&mimetype=image/svg+xml" },
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: /\.(jpe?g|png|gif)$/i,
loader: 'url?limit=10000&name=img/[hash:8].[name].[ext]'
}
]
},
//其它解决方案配置
resolve: {
extensions: ['', '.js', '.json', '.less', '.jsx']
// ,alias: {
// AppStore : 'js/stores/AppStores.js',
// ActionType : 'js/actions/ActionType.js',
// AppAction : 'js/actions/AppAction.js'
// }
},
node: {
fs: 'empty'
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mrh111/ck_area.git
git@gitee.com:mrh111/ck_area.git
mrh111
ck_area
ck_area
master

搜索帮助