@pixolith/webpack-sw6-config 8.1.4 → 8.1.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixolith/webpack-sw6-config",
|
|
3
3
|
"public": true,
|
|
4
|
-
"version": "8.1.
|
|
4
|
+
"version": "8.1.6",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"scripts": {},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://github.com/pixolith/webpack-plugins/issues"
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/pixolith/webpack-plugins/tree/master/packages/webpack-hook-plugin/#readme",
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "29093a6ab1223007b4e1e8a5752a5f40b69570c3",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/cli": "7.23.4",
|
|
27
27
|
"@babel/core": "^7.23.7",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@pixolith/webpack-assets-copy-plugin": "^8.0.0",
|
|
36
36
|
"@pixolith/webpack-filename-linter-plugin": "^8.0.0",
|
|
37
37
|
"@pixolith/webpack-hook-plugin": "^8.0.0",
|
|
38
|
-
"@pixolith/webpack-sw6-plugin-map-emitter": "^8.1.
|
|
39
|
-
"@pixolith/webpack-watcher": "^8.
|
|
38
|
+
"@pixolith/webpack-sw6-plugin-map-emitter": "^8.1.6",
|
|
39
|
+
"@pixolith/webpack-watcher": "^8.1.6",
|
|
40
40
|
"@swc/core": "^1.7.0",
|
|
41
41
|
"autoprefixer": "^10.4.14",
|
|
42
42
|
"babel-loader": "^9.1.2",
|
package/src/index.js
CHANGED
|
@@ -11,7 +11,6 @@ const Consola = require('consola');
|
|
|
11
11
|
const setup = () => {
|
|
12
12
|
Consola.info('Cleaning output folder');
|
|
13
13
|
watcher.clean();
|
|
14
|
-
Consola.info('Building index files');
|
|
15
14
|
watcher.run();
|
|
16
15
|
console.table({
|
|
17
16
|
isProd: isProd,
|
|
@@ -20,7 +19,6 @@ const setup = () => {
|
|
|
20
19
|
publicPath: process.env.PUBLIC_PATH,
|
|
21
20
|
sharedAssetPath: process.env.SHARED_SCSS_PATH,
|
|
22
21
|
shopwareMode: process.env.SHOPWARE_MODE,
|
|
23
|
-
jsTranspile: process.env.JS_TRANSPILE,
|
|
24
22
|
globalResourcesPaths: process.env.RESOURCES_PATHS,
|
|
25
23
|
debug: process.env.DEBUG || false,
|
|
26
24
|
version: pkg.version,
|
|
@@ -204,7 +204,7 @@ module.exports = {
|
|
|
204
204
|
Path.extname(fromPath),
|
|
205
205
|
'',
|
|
206
206
|
).replace('pxsw-', ''),
|
|
207
|
-
pluginName = ChangeCase.pascalCase(composerPluginName);
|
|
207
|
+
pluginName = 'Pxsw' + ChangeCase.pascalCase(composerPluginName);
|
|
208
208
|
|
|
209
209
|
let isPlugin = await Fs.existsSync(`custom/plugins/${pluginName}/src`),
|
|
210
210
|
isStaticPlugin = await Fs.existsSync(`custom/static-plugins/${pluginName}/src`);
|
|
@@ -101,7 +101,7 @@ module.exports = {
|
|
|
101
101
|
webSocketURL: {
|
|
102
102
|
hostname: 'node.px-staging.de',
|
|
103
103
|
protocol: 'wss',
|
|
104
|
-
port: 8080,
|
|
104
|
+
port: process.env.SHOPWARE_MODE === 'administration' ? 8080 : 8081,
|
|
105
105
|
},
|
|
106
106
|
overlay: {
|
|
107
107
|
warnings: false,
|
|
@@ -115,6 +115,7 @@ module.exports = {
|
|
|
115
115
|
'Access-Control-Allow-Headers':
|
|
116
116
|
'X-Requested-With, content-type, Authorization',
|
|
117
117
|
},
|
|
118
|
+
port: process.env.SHOPWARE_MODE === 'administration' ? 8080 : 8081,
|
|
118
119
|
server: !isProd
|
|
119
120
|
? {
|
|
120
121
|
type: 'https',
|
|
@@ -143,13 +144,17 @@ module.exports = {
|
|
|
143
144
|
devMiddleware: {
|
|
144
145
|
writeToDisk: true,
|
|
145
146
|
},
|
|
146
|
-
|
|
147
|
-
if (!
|
|
148
|
-
|
|
149
|
-
`Starting webpack in [${process.env.NODE_ENV}] with [${process.env.SHOPWARE_MODE}]`,
|
|
150
|
-
);
|
|
151
|
-
watcher.watch();
|
|
147
|
+
setupMiddlewares: (middlewares, devServer) => {
|
|
148
|
+
if (!devServer) {
|
|
149
|
+
throw new Error("webpack-dev-server is not defined")
|
|
152
150
|
}
|
|
151
|
+
|
|
152
|
+
Consola.success(
|
|
153
|
+
`Starting webpack in [${process.env.NODE_ENV}] with [${process.env.SHOPWARE_MODE}]`,
|
|
154
|
+
);
|
|
155
|
+
watcher.watch();
|
|
156
|
+
|
|
157
|
+
return middlewares;
|
|
153
158
|
},
|
|
154
159
|
},
|
|
155
160
|
plugins: [
|