ant-design/webpack.config.js

38 lines
775 B
JavaScript
Raw Normal View History

2015-05-21 20:36:13 +08:00
var webpack = require('webpack');
2015-06-05 17:27:05 +08:00
var ExtractTextPlugin = require("extract-text-webpack-plugin");
2015-05-25 17:20:49 +08:00
var path = require('path');
2015-05-21 20:36:13 +08:00
module.exports = {
2015-06-05 17:52:16 +08:00
entry: {
antd: './index.js'
},
2015-05-21 20:36:13 +08:00
resolve: {
extensions: ['', '.js', '.jsx'],
},
output: {
2015-05-25 17:20:49 +08:00
path: path.join(process.cwd(), 'dist'),
2015-06-05 17:52:16 +08:00
filename: '[name].js'
2015-05-21 20:36:13 +08:00
},
externals: {
react: "React"
},
module: {
loaders: [
{test: /\.jsx?$/, loader: 'babel'},
2015-05-21 20:36:13 +08:00
{test: /\.json$/, loader: 'json-loader'},
2015-06-05 17:27:05 +08:00
{test: /\.less$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader")},
{test: /\.css/, loader: ExtractTextPlugin.extract("style-loader", "css-loader")}
2015-05-21 20:36:13 +08:00
]
},
2015-05-25 17:28:22 +08:00
2015-06-05 17:27:05 +08:00
plugins: [
2015-06-05 17:52:16 +08:00
new ExtractTextPlugin("[name].css")
2015-06-05 17:27:05 +08:00
],
2015-05-25 17:28:22 +08:00
devtool: "#source-map"
2015-05-21 20:36:13 +08:00
};