ant-design/webpack.config.js
2015-10-20 16:47:55 +08:00

49 lines
997 B
JavaScript

var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var path = require('path');
var pkg = require('./package');
var entry = {};
entry['index'] = './scripts/importCss.js';
entry['demo'] = './scripts/demo.js';
module.exports = {
entry: entry,
resolve: {
extensions: ['', '.js', '.jsx']
},
output: {
path: path.join(process.cwd(), 'dist'),
filename: '[name].js'
},
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel'
}, {
test: /\.json$/,
loader: 'json-loader'
}, {
test: /\.less$/,
loader: ExtractTextPlugin.extract(
'css?sourceMap&-minimize!' + 'autoprefixer-loader!' + 'less?sourceMap'
)
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'css?sourceMap&-minimize!' + 'autoprefixer-loader'
)
}]
},
plugins: [
new ExtractTextPlugin('[name].css')
],
devtool: 'source-map'
};