weboptimizer 2.0.1167 → 2.0.1168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/webpackConfigurator.js +14 -9
package/package.json
CHANGED
package/webpackConfigurator.js
CHANGED
|
@@ -896,6 +896,11 @@ var cssUse = _module.preprocessor.cascadingStyleSheet.additional.pre.map(evaluat
|
|
|
896
896
|
hooks: {
|
|
897
897
|
onSaveSpritesheet: function onSaveSpritesheet(image) {
|
|
898
898
|
return (0, _path.join)(image.spritePath, (0, _path.relative)(configuration.path.target.asset.image, configuration.files.compose.image));
|
|
899
|
+
},
|
|
900
|
+
// TODO
|
|
901
|
+
onUpdateRule: function onUpdateRule(rule, declaration, output) {
|
|
902
|
+
console.log('u', declaration.value, declaration.text);
|
|
903
|
+
return output;
|
|
899
904
|
}
|
|
900
905
|
},
|
|
901
906
|
stylesheetPath: configuration.path.source.asset.cascadingStyleSheet,
|
|
@@ -919,7 +924,7 @@ var genericLoader = {
|
|
|
919
924
|
use: _module.preprocessor.ejs.additional.pre.map(evaluateMapper).concat({
|
|
920
925
|
loader: 'file?name=[path][name]' + ((_clientnode["default"].isPlainObject(_module.preprocessor.ejs.options) ? _module.preprocessor.ejs.options : {
|
|
921
926
|
compileSteps: 2
|
|
922
|
-
}).compileSteps % 2 ? '.js' : '') + "?".concat(configuration.hashAlgorithm, "=[
|
|
927
|
+
}).compileSteps % 2 ? '.js' : '') + "?".concat(configuration.hashAlgorithm, "=[contenthash]")
|
|
923
928
|
}, {
|
|
924
929
|
loader: 'extract'
|
|
925
930
|
}, {
|
|
@@ -981,7 +986,7 @@ var genericLoader = {
|
|
|
981
986
|
use: _module.preprocessor.html.additional.pre.map(evaluateMapper).concat({
|
|
982
987
|
loader: 'file?name=' + (0, _path.join)((0, _path.relative)(configuration.path.target.asset.base, configuration.path.target.asset.template), '[name]' + ((_clientnode["default"].isPlainObject(_module.preprocessor.html.options) ? _module.preprocessor.html.options : {
|
|
983
988
|
compileSteps: 2
|
|
984
|
-
}).compileSteps % 2 ? '.js' : '') + "?".concat(configuration.hashAlgorithm, "=[
|
|
989
|
+
}).compileSteps % 2 ? '.js' : '') + "?".concat(configuration.hashAlgorithm, "=[contenthash]"))
|
|
985
990
|
}, (_clientnode["default"].isPlainObject(_module.preprocessor.html.options) ? _module.preprocessor.html.options : {
|
|
986
991
|
compileSteps: 2
|
|
987
992
|
}).compileSteps % 2 ? [] : [{
|
|
@@ -1003,7 +1008,7 @@ var genericLoader = {
|
|
|
1003
1008
|
include: configuration.path.source.asset.template,
|
|
1004
1009
|
test: /\.html(?:\?.*)?$/i,
|
|
1005
1010
|
use: _module.html.additional.pre.map(evaluateMapper).concat({
|
|
1006
|
-
loader: 'file?name=' + (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.template), "[name][ext]?".concat(configuration.hashAlgorithm, "=") + '[
|
|
1011
|
+
loader: 'file?name=' + (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.template), "[name][ext]?".concat(configuration.hashAlgorithm, "=") + '[contenthash]')
|
|
1007
1012
|
}, {
|
|
1008
1013
|
loader: 'extract'
|
|
1009
1014
|
}, {
|
|
@@ -1054,7 +1059,7 @@ var genericLoader = {
|
|
|
1054
1059
|
return _module.optimizer.font.eot.exclude === null ? false : Boolean(evaluate(_module.optimizer.font.eot.exclude, filePath));
|
|
1055
1060
|
},
|
|
1056
1061
|
generator: {
|
|
1057
|
-
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[
|
|
1062
|
+
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[contenthash]")
|
|
1058
1063
|
},
|
|
1059
1064
|
test: /\.eot(?:\?.*)?$/i,
|
|
1060
1065
|
type: 'asset/resource',
|
|
@@ -1071,7 +1076,7 @@ var genericLoader = {
|
|
|
1071
1076
|
},
|
|
1072
1077
|
include: configuration.path.source.asset.font,
|
|
1073
1078
|
generator: {
|
|
1074
|
-
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[
|
|
1079
|
+
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[contenthash]")
|
|
1075
1080
|
},
|
|
1076
1081
|
mimetype: 'image/svg+xml',
|
|
1077
1082
|
parser: {
|
|
@@ -1088,7 +1093,7 @@ var genericLoader = {
|
|
|
1088
1093
|
return _module.optimizer.font.ttf.exclude === null ? false : Boolean(evaluate(_module.optimizer.font.ttf.exclude, filePath));
|
|
1089
1094
|
},
|
|
1090
1095
|
generator: {
|
|
1091
|
-
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[
|
|
1096
|
+
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[contenthash]")
|
|
1092
1097
|
},
|
|
1093
1098
|
test: /\.ttf(?:\?.*)?$/i,
|
|
1094
1099
|
type: 'asset/resource',
|
|
@@ -1105,7 +1110,7 @@ var genericLoader = {
|
|
|
1105
1110
|
return _module.optimizer.font.woff.exclude === null ? false : Boolean(evaluate(_module.optimizer.font.woff.exclude, filePath));
|
|
1106
1111
|
},
|
|
1107
1112
|
generator: {
|
|
1108
|
-
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[
|
|
1113
|
+
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[contenthash]")
|
|
1109
1114
|
},
|
|
1110
1115
|
test: /\.woff2?(?:\?.*)?$/i,
|
|
1111
1116
|
type: 'asset/resource',
|
|
@@ -1124,7 +1129,7 @@ var genericLoader = {
|
|
|
1124
1129
|
return _module.optimizer.image.exclude === null ? isFilePathInDependencies(filePath) : Boolean(evaluate(_module.optimizer.image.exclude, filePath));
|
|
1125
1130
|
},
|
|
1126
1131
|
generator: {
|
|
1127
|
-
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.image), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[
|
|
1132
|
+
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.image), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[contenthash]")
|
|
1128
1133
|
},
|
|
1129
1134
|
include: configuration.path.source.asset.image,
|
|
1130
1135
|
test: /\.(?:gif|ico|jpg|png|svg)(?:\?.*)?$/i,
|
|
@@ -1144,7 +1149,7 @@ var genericLoader = {
|
|
|
1144
1149
|
return configuration.extensions.file.internal.includes((0, _path.extname)(_helper["default"].stripLoader(filePath))) || (_module.optimizer.data.exclude === null ? isFilePathInDependencies(filePath) : Boolean(evaluate(_module.optimizer.data.exclude, filePath)));
|
|
1145
1150
|
},
|
|
1146
1151
|
generator: {
|
|
1147
|
-
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.data), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[
|
|
1152
|
+
filename: (0, _path.join)((0, _path.relative)(configuration.path.target.base, configuration.path.target.asset.data), '[name][ext]') + "?".concat(configuration.hashAlgorithm, "=[contenthash]")
|
|
1148
1153
|
},
|
|
1149
1154
|
test: /.+/,
|
|
1150
1155
|
type: 'asset/resource',
|