@shopgate/webpack 7.24.0-beta.2 → 7.24.1

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 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).replace(/(^(lib|src)+\/)|(\.js$)/ig, '');
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.24.0-beta.2",
3
+ "version": "7.24.1",
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.12.1",
21
- "script-ext-html-webpack-plugin": "^2.1.4",
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": "3.3.6",
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": "3.7.2"
30
+ "webpack-dev-server": "4.15.2"
31
31
  }
32
32
  }
@@ -6,6 +6,7 @@
6
6
  <meta id="libshopgate">
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, viewport-fit=cover">
8
8
  <meta name="apple-mobile-web-app-capable" content="yes">
9
+ <meta name="mobile-web-app-capable" content="yes">
9
10
  <title>
10
11
  <%= htmlWebpackPlugin.options.title %>
11
12
  </title>
package/webpack.config.js CHANGED
@@ -87,7 +87,7 @@ const config = {
87
87
  * release process.
88
88
  */
89
89
  new webpack.NormalModuleReplacementPlugin(
90
- /swiper\/shared\/utils\.mjs$/,
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,
@@ -188,7 +187,7 @@ const config = {
188
187
  },
189
188
  {
190
189
  test: /\.(js|jsx)$/,
191
- exclude: new RegExp(`node_modules\\b(?!${path.sep}@shopgate|${path.sep}react-leaflet|${path.sep}@react-leaflet)\\b.*`),
190
+ exclude: new RegExp(`node_modules\\b(?!\\${path.sep}@shopgate)\\b.*`),
192
191
  use: [
193
192
  {
194
193
  loader: 'babel-loader',
@@ -212,15 +211,19 @@ const config = {
212
211
  devServer: {
213
212
  hot: true,
214
213
  headers: { 'Access-Control-Allow-Origin': '*' },
215
- publicPath: '/',
216
- disableHostCheck: true,
217
- contentBase: path.resolve(themePath, PUBLIC_FOLDER),
218
- host: process.env.optionsHost,
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}`,