mirror of https://github.com/alibaba/ice.git
39 lines
788 B
JavaScript
39 lines
788 B
JavaScript
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const ExtractCssAssetsPlugin = require('../../../src/cjs');
|
|
|
|
module.exports = {
|
|
entry: './index',
|
|
output: {
|
|
publicPath: '/',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(png|jpg|gif|eot)(.*)?$/,
|
|
use: [
|
|
{
|
|
loader: 'url-loader',
|
|
options: {
|
|
limit: 8192,
|
|
name: 'assets/[hash].[ext]',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: [MiniCssExtractPlugin.loader, 'css-loader'],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new MiniCssExtractPlugin({
|
|
filename: '[name].css',
|
|
chunkFilename: '[id].css',
|
|
}),
|
|
new ExtractCssAssetsPlugin({
|
|
outputPath: 'cssassets/',
|
|
}),
|
|
],
|
|
};
|