@shopgate/webpack 7.23.10 → 7.23.11-beta.2
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/lib/i18n.js +5 -1
- package/package.json +5 -5
- package/webpack.config.js +12 -9
package/lib/i18n.js
CHANGED
|
@@ -52,7 +52,11 @@ module.exports = (modulePath) => {
|
|
|
52
52
|
i18n = new I18n('en');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const moduleNamespace = path.relative(rootDirectory, modulePath)
|
|
55
|
+
const moduleNamespace = path.relative(rootDirectory, modulePath)
|
|
56
|
+
.replace(/(^(lib|src)+[/\\])|(\.js$)/ig, '')
|
|
57
|
+
// Normalize OS specific path separators to forward slashes to be able to access translation
|
|
58
|
+
// keys inside the translation JSON file.
|
|
59
|
+
.split(path.sep).join('/');
|
|
56
60
|
|
|
57
61
|
return (key, data) => {
|
|
58
62
|
const keyPath = [moduleNamespace];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/webpack",
|
|
3
|
-
"version": "7.23.
|
|
3
|
+
"version": "7.23.11-beta.2",
|
|
4
4
|
"description": "The webpack configuration for Shopgate's Engage.",
|
|
5
5
|
"main": "webpack.config.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"intl": "1.2.5",
|
|
18
18
|
"lodash": "^4.17.4",
|
|
19
19
|
"messageformat": "^2.3.0",
|
|
20
|
-
"progress-bar-webpack-plugin": "^1.
|
|
21
|
-
"script-ext-html-webpack-plugin": "^2.1.
|
|
20
|
+
"progress-bar-webpack-plugin": "^2.1.0",
|
|
21
|
+
"script-ext-html-webpack-plugin": "^2.1.5",
|
|
22
22
|
"style-loader": "0.23.1",
|
|
23
23
|
"terser-webpack-plugin": "^4.2.3",
|
|
24
24
|
"webpack": "^4.47.0",
|
|
25
|
-
"webpack-cli": "
|
|
25
|
+
"webpack-cli": "4.10.0",
|
|
26
26
|
"workbox-webpack-plugin": "4.3.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"rxjs": "~5.5.12",
|
|
30
|
-
"webpack-dev-server": "
|
|
30
|
+
"webpack-dev-server": "4.15.2"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/webpack.config.js
CHANGED
|
@@ -87,7 +87,7 @@ const config = {
|
|
|
87
87
|
* release process.
|
|
88
88
|
*/
|
|
89
89
|
new webpack.NormalModuleReplacementPlugin(
|
|
90
|
-
/swiper
|
|
90
|
+
/swiper[/\\]shared[/\\]utils\.mjs$/,
|
|
91
91
|
path.resolve(__dirname, 'patches', 'swiper', 'shared', 'utils.mjs')
|
|
92
92
|
),
|
|
93
93
|
new webpack.DefinePlugin({
|
|
@@ -117,7 +117,6 @@ const config = {
|
|
|
117
117
|
}),
|
|
118
118
|
new webpack.optimize.ModuleConcatenationPlugin(),
|
|
119
119
|
new webpack.HashedModuleIdsPlugin(),
|
|
120
|
-
new webpack.HotModuleReplacementPlugin(),
|
|
121
120
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
122
121
|
new HTMLWebpackPlugin({
|
|
123
122
|
title: appConfig.shopName || process.env.theme,
|
|
@@ -212,15 +211,19 @@ const config = {
|
|
|
212
211
|
devServer: {
|
|
213
212
|
hot: true,
|
|
214
213
|
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
devMiddleware: {
|
|
215
|
+
publicPath: '/',
|
|
216
|
+
stats: {
|
|
217
|
+
colors: true,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
allowedHosts: 'all',
|
|
221
|
+
static: {
|
|
222
|
+
directory: path.resolve(themePath, PUBLIC_FOLDER),
|
|
223
|
+
},
|
|
224
|
+
host: '0.0.0.0',
|
|
219
225
|
port: process.env.optionsPort,
|
|
220
226
|
historyApiFallback: true,
|
|
221
|
-
stats: {
|
|
222
|
-
colors: true,
|
|
223
|
-
},
|
|
224
227
|
proxy: process.env.WEB_BRIDGE ? {
|
|
225
228
|
'/api': {
|
|
226
229
|
target: `http://${ip}:${apiPort}`,
|