@shopgate/webpack 7.25.0-beta.2 → 7.26.0-beta.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 +1 -5
- package/package.json +5 -5
- package/templates/default.ejs +0 -1
- package/webpack.config.js +10 -17
package/lib/i18n.js
CHANGED
|
@@ -52,11 +52,7 @@ module.exports = (modulePath) => {
|
|
|
52
52
|
i18n = new I18n('en');
|
|
53
53
|
}
|
|
54
54
|
|
|
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('/');
|
|
55
|
+
const moduleNamespace = path.relative(rootDirectory, modulePath).replace(/(^(lib|src)+\/)|(\.js$)/ig, '');
|
|
60
56
|
|
|
61
57
|
return (key, data) => {
|
|
62
58
|
const keyPath = [moduleNamespace];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/webpack",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.26.0-beta.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": "^
|
|
21
|
-
"script-ext-html-webpack-plugin": "^2.1.
|
|
20
|
+
"progress-bar-webpack-plugin": "^1.12.1",
|
|
21
|
+
"script-ext-html-webpack-plugin": "^2.1.4",
|
|
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": "3.3.6",
|
|
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": "3.7.2"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/templates/default.ejs
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
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">
|
|
10
9
|
<title>
|
|
11
10
|
<%= htmlWebpackPlugin.options.title %>
|
|
12
11
|
</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
|
|
90
|
+
/swiper\/shared\/utils\.mjs$/,
|
|
91
91
|
path.resolve(__dirname, 'patches', 'swiper', 'shared', 'utils.mjs')
|
|
92
92
|
),
|
|
93
93
|
new webpack.DefinePlugin({
|
|
@@ -117,6 +117,7 @@ const config = {
|
|
|
117
117
|
}),
|
|
118
118
|
new webpack.optimize.ModuleConcatenationPlugin(),
|
|
119
119
|
new webpack.HashedModuleIdsPlugin(),
|
|
120
|
+
new webpack.HotModuleReplacementPlugin(),
|
|
120
121
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
121
122
|
new HTMLWebpackPlugin({
|
|
122
123
|
title: appConfig.shopName || process.env.theme,
|
|
@@ -187,7 +188,7 @@ const config = {
|
|
|
187
188
|
},
|
|
188
189
|
{
|
|
189
190
|
test: /\.(js|jsx)$/,
|
|
190
|
-
exclude: new RegExp(`node_modules\\b(
|
|
191
|
+
exclude: new RegExp(`node_modules\\b(?!\\${path.sep}@shopgate)\\b.*`),
|
|
191
192
|
use: [
|
|
192
193
|
{
|
|
193
194
|
loader: 'babel-loader',
|
|
@@ -211,23 +212,15 @@ const config = {
|
|
|
211
212
|
devServer: {
|
|
212
213
|
hot: true,
|
|
213
214
|
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
allowedHosts: 'all',
|
|
221
|
-
static: {
|
|
222
|
-
directory: path.resolve(themePath, PUBLIC_FOLDER),
|
|
223
|
-
},
|
|
224
|
-
client: {
|
|
225
|
-
// Deactivate full-screen error overlay in dev server
|
|
226
|
-
overlay: false,
|
|
227
|
-
},
|
|
228
|
-
host: '0.0.0.0',
|
|
215
|
+
publicPath: '/',
|
|
216
|
+
disableHostCheck: true,
|
|
217
|
+
contentBase: path.resolve(themePath, PUBLIC_FOLDER),
|
|
218
|
+
host: process.env.optionsHost,
|
|
229
219
|
port: process.env.optionsPort,
|
|
230
220
|
historyApiFallback: true,
|
|
221
|
+
stats: {
|
|
222
|
+
colors: true,
|
|
223
|
+
},
|
|
231
224
|
proxy: process.env.WEB_BRIDGE ? {
|
|
232
225
|
'/api': {
|
|
233
226
|
target: `http://${ip}:${apiPort}`,
|