@shopgate/webpack 7.30.0-alpha.4 → 7.30.0-alpha.6
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/locales/en.json +1 -1
- package/package.json +4 -2
- package/plugins/ShopgateIndexerPlugin.js +1 -6
- package/webpack.config.js +8 -2
package/locales/en.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"STRINGS_COULD_NOT_BE_CREATED": "Strings could not be created",
|
|
12
12
|
"INDEXING_TYPE": "Indexing {type}...",
|
|
13
13
|
"INDEXED_TYPE": "... {type} indexed.",
|
|
14
|
-
"NO_EXTENSIONS_FOUND_FOR_TYPE": "No extensions found for
|
|
14
|
+
"NO_EXTENSIONS_FOUND_FOR_TYPE": "No extensions found for \"{type}\"",
|
|
15
15
|
"TYPE_PORTALS": "portals",
|
|
16
16
|
"TYPE_REDUCERS": "reducers",
|
|
17
17
|
"TYPE_SUBSCRIBERS": "subscribers",
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/webpack",
|
|
3
|
-
"version": "7.30.0-alpha.
|
|
3
|
+
"version": "7.30.0-alpha.6",
|
|
4
4
|
"description": "The webpack configuration for Shopgate's Engage.",
|
|
5
5
|
"main": "webpack.config.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"
|
|
8
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.17",
|
|
9
|
+
"ajv": "^8.17.1",
|
|
9
10
|
"babel-loader": "8.4.1",
|
|
10
11
|
"chalk": "^4.1.2",
|
|
11
12
|
"color": "^4.2.3",
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
"lodash": "^4.17.21",
|
|
19
20
|
"mini-css-extract-plugin": "^2.9.4",
|
|
20
21
|
"progress-bar-webpack-plugin": "^2.1.0",
|
|
22
|
+
"react-refresh": "^0.18.0",
|
|
21
23
|
"style-loader": "3.3.4",
|
|
22
24
|
"terser-webpack-plugin": "^5.3.14",
|
|
23
25
|
"webpack": "^5.102.1",
|
|
@@ -76,7 +76,6 @@ function readConfig(options) {
|
|
|
76
76
|
const exports = [exportsStart]; // Holds the export strings.
|
|
77
77
|
|
|
78
78
|
if (type === TYPE_PORTALS || type === TYPE_WIDGETS || type === TYPE_WIDGETS_V2) {
|
|
79
|
-
imports.push('import { hot } from \'react-hot-loader/root\';');
|
|
80
79
|
imports.push('import { lazy } from \'react\';');
|
|
81
80
|
imports.push('');
|
|
82
81
|
}
|
|
@@ -107,11 +106,7 @@ function readConfig(options) {
|
|
|
107
106
|
return;
|
|
108
107
|
}
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
exports.push(` '${id}': hot(${variableName}),`);
|
|
112
|
-
} else {
|
|
113
|
-
exports.push(` '${id}': ${variableName},`);
|
|
114
|
-
}
|
|
109
|
+
exports.push(` '${id}': ${variableName},`);
|
|
115
110
|
});
|
|
116
111
|
|
|
117
112
|
if (importsEnd) {
|
package/webpack.config.js
CHANGED
|
@@ -10,6 +10,7 @@ const { GenerateSW } = require('workbox-webpack-plugin');
|
|
|
10
10
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
11
11
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
12
12
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
13
|
+
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
13
14
|
const rxPaths = require('rxjs/_esm5/path-mapping');
|
|
14
15
|
const ShopgateIndexerPlugin = require('./plugins/ShopgateIndexerPlugin');
|
|
15
16
|
const ShopgateThemeConfigValidatorPlugin = require('./plugins/ShopgateThemeConfigValidatorPlugin');
|
|
@@ -79,7 +80,7 @@ const config = {
|
|
|
79
80
|
|
|
80
81
|
// Packages from common module
|
|
81
82
|
react: resolveForAliasPackage('react'),
|
|
82
|
-
'react-dom': resolveForAliasPackage('
|
|
83
|
+
'react-dom': resolveForAliasPackage('react-dom'),
|
|
83
84
|
'react-redux': resolveForAliasPackage('react-redux'),
|
|
84
85
|
reselect: resolveForAliasPackage('reselect'),
|
|
85
86
|
glamor: resolveForAliasPackage('glamor'),
|
|
@@ -90,7 +91,6 @@ const config = {
|
|
|
90
91
|
'react-helmet': resolveForAliasPackage('react-helmet'),
|
|
91
92
|
'css-spring': resolveForAliasPackage('css-spring'),
|
|
92
93
|
'react-transition-group': resolveForAliasPackage('react-transition-group'),
|
|
93
|
-
'react-hot-loader': resolveForAliasPackage('react-hot-loader'),
|
|
94
94
|
'@virtuous': resolveForAliasPackage('@virtuous'),
|
|
95
95
|
lodash: resolveForAliasPackage('lodash'),
|
|
96
96
|
'prop-types': resolveForAliasPackage('prop-types'),
|
|
@@ -184,6 +184,7 @@ const config = {
|
|
|
184
184
|
...(isDev && addBundleAnalyzer ? [
|
|
185
185
|
new BundleAnalyzerPlugin(),
|
|
186
186
|
] : []),
|
|
187
|
+
...(isDev ? [new ReactRefreshWebpackPlugin()] : []),
|
|
187
188
|
...(!isDev ? [
|
|
188
189
|
new CompressionWebpackPlugin({
|
|
189
190
|
filename: '[path][base].gz[query]',
|
|
@@ -237,6 +238,7 @@ const config = {
|
|
|
237
238
|
options: {
|
|
238
239
|
configFile: path.resolve(themePath, 'babel.config.js'),
|
|
239
240
|
cacheDirectory: path.resolve(themePath, '..', '..', '.cache-loader'),
|
|
241
|
+
plugins: [isDev && require.resolve('react-refresh/babel')].filter(Boolean),
|
|
240
242
|
},
|
|
241
243
|
},
|
|
242
244
|
],
|
|
@@ -252,6 +254,10 @@ const config = {
|
|
|
252
254
|
},
|
|
253
255
|
devtool,
|
|
254
256
|
stats: isDev ? 'normal' : 'errors-only',
|
|
257
|
+
ignoreWarnings: [
|
|
258
|
+
// Disable warning about named imports from JSON files. It's covered by our linter rules.
|
|
259
|
+
/from default-exporting module \(only default export is available soon\)/,
|
|
260
|
+
],
|
|
255
261
|
performance: {
|
|
256
262
|
hints: isDev ? false : 'warning',
|
|
257
263
|
},
|