You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
856 B

var webpack = require('webpack');
10 years ago
var ExtractTextPlugin = require("extract-text-webpack-plugin");
10 years ago
var path = require('path');
module.exports = {
entry: {
antd: './index.js'
},
resolve: {
extensions: ['', '.js', '.jsx'],
},
output: {
10 years ago
path: path.join(process.cwd(), 'dist'),
filename: '[name].js'
},
externals: {
react: "React"
},
module: {
loaders: [
{test: /\.jsx?$/, loader: 'babel'},
{test: /\.json$/, loader: 'json-loader'},
10 years ago
{
test: /\.less$/,
loader: ExtractTextPlugin.extract(
'css?sourceMap!' +
'less?sourceMap'
)
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'css?sourceMap'
)
}
]
},
10 years ago
plugins: [
10 years ago
new ExtractTextPlugin('[name].css')
10 years ago
],
10 years ago
devtool: '#source-map'
};