1 Star 0 Fork 1

Bowen/react-grid-layout

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack-examples.config.js 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
Nik Nyby 提交于 2017-02-16 22:43 . Update webpack to 2.2.1 (#488)
'use strict';
var webpack = require('webpack');
var fs = require('fs');
// Builds example bundles
module.exports = {
context: __dirname,
entry: {
commons: ["lodash"],
},
output: {
path: __dirname + "/dist",
filename: "[name].bundle.js",
sourceMapFilename: "[file].map",
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader', query: {
cacheDirectory: true,
plugins: [
'transform-react-inline-elements',
'transform-react-constant-elements',
]
}}
]
},
plugins: [
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'commons', filename: 'commons.js'
})
],
resolve: {
extensions: [".webpack.js", ".web.js", ".js", ".jsx"],
alias: {'react-grid-layout': __dirname + '/index-dev.js'}
}
};
// Load all entry points
var files = fs.readdirSync(__dirname + '/test/examples').filter(function(element, index, array){
return element.match(/^.+\.jsx$/);
});
for(var idx in files){
var file = files[idx];
var module_name = file.replace(/\.jsx$/,'');
module.exports.entry[module_name] = './test/examples/' + file;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/kevin402502/react-grid-layout.git
git@gitee.com:kevin402502/react-grid-layout.git
kevin402502
react-grid-layout
react-grid-layout
master

搜索帮助