This commit is contained in:
2022-07-21 03:28:35 +00:00
parent d7c883d6df
commit 51b34b0e1d
30103 changed files with 4152204 additions and 23 deletions
@@ -0,0 +1 @@
body{color:red}a{color:blue}
@@ -0,0 +1 @@
body{margin:0;color:red}p{margin:1000px}
@@ -0,0 +1 @@
body{color:red;padding:0;margin:0}p{padding:500px;padding:1000px}
@@ -0,0 +1 @@
body{color:red}a{color:blue}body{margin:0;color:red}p{margin:1000px}body{color:red;padding:0;margin:0}p{padding:500px;padding:1000px}
@@ -0,0 +1,10 @@
/*
This test is here to confirm that assetNameRegExp option will apply
only to the names of the files exported byt ExtractTextPlugin
*/
require('./a_optimize-me.css');
require('./b_optimize-me.css');
require('./c.css');
@@ -0,0 +1,25 @@
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import OptimizeCssAssetsPlugin from '../../../src/';
module.exports = {
entry: './index',
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: { loader: 'style-loader' },
use: {
loader: 'css-loader'
}
})
},
],
},
plugins: [
new ExtractTextPlugin('file.css'),
new OptimizeCssAssetsPlugin({
assetNameRegExp: /optimize-me\.css/g
})
],
};