@pixolith/webpack-sw6-config 11.0.6 → 11.0.7

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": "11.0.6",
4
+ "version": "11.0.7",
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": "a1068c0b7e1e124c70026b073d099731110b8e12",
24
+ "gitHead": "10f5dfbbaaec777f2324679e1279b9c78b7e7f49",
25
25
  "dependencies": {
26
26
  "@babel/cli": "7.25.9",
27
27
  "@babel/core": "^7.26.0",
@@ -36,7 +36,7 @@
36
36
  "@pixolith/webpack-filename-linter-plugin": "^11.0.0",
37
37
  "@pixolith/webpack-hook-plugin": "^11.0.0",
38
38
  "@pixolith/webpack-sw6-plugin-map-emitter": "^11.0.0",
39
- "@pixolith/webpack-twig-assets-emitter-plugin": "^11.0.6",
39
+ "@pixolith/webpack-twig-assets-emitter-plugin": "^11.0.7",
40
40
  "@pixolith/webpack-watcher": "^11.0.5",
41
41
  "@swc/core": "^1.9.3",
42
42
  "autoprefixer": "^10.4.20",
@@ -11,13 +11,13 @@ const Path = require('path'),
11
11
  TwigAssetEmitterPlugin = require('@pixolith/webpack-twig-assets-emitter-plugin'),
12
12
  outputConfig = {
13
13
  path: config.outputPath,
14
- publicPath: '/',
14
+ publicPath: config.shopwareVersion === '6.6' ? '/' : config.assetUrl,
15
15
  filename: (chunkData) => {
16
16
  let pluginName = chunkData.chunk.name.toLowerCase().replace('pxsw-pxsw-', 'pxsw-');
17
17
  pluginName = config.shopwareVersion === '6.6' ? pluginName.replace('vendor-', '') : pluginName;
18
18
  return config.shopwareVersion === '6.6' ?
19
19
  `${pluginName.replace(/-/g, '',)}/administration/js/${pluginName}.js` :
20
- `js/${pluginName}${
20
+ `js/${chunkData.chunk.name.toLowerCase()}${
21
21
  config.isProd ? '.admin.[contenthash]' : ''
22
22
  }.js`;
23
23
  }
@@ -28,7 +28,7 @@ const Path = require('path'),
28
28
  pluginName = config.shopwareVersion === '6.6' ? pluginName.replace('vendor-', '') : pluginName;
29
29
  return config.shopwareVersion === '6.6' ?
30
30
  `${pluginName.replace(/-/g, '',)}/administration/css/${pluginName}.css` :
31
- `css/${pluginName}${
31
+ `css/[name]${
32
32
  config.isProd ? '.admin.[contenthash]' : ''
33
33
  }.css`;
34
34
  }
@@ -73,14 +73,14 @@ module.exports = {
73
73
  test: /\.(jpe?g|png|gif|ico)(\?v=\d+\.\d+\.\d+)?$/,
74
74
  type: 'asset/resource',
75
75
  generator: {
76
- filename: '../img/[name][ext]'
76
+ filename: config.shopwareVersion === '6.6' ? '../img/[name][ext]' : 'img/[name][ext]'
77
77
  }
78
78
  },
79
79
  {
80
80
  test: /\.(eot|ttf|woff2?)(\?v=\d+\.\d+\.\d+)?$/,
81
81
  type: 'asset/resource',
82
82
  generator: {
83
- filename: '../fonts/[name][ext]'
83
+ filename: config.shopwareVersion === '6.6' ? '../fonts/[name][ext]' : 'fonts/[name][ext]'
84
84
  }
85
85
  },
86
86
  {
@@ -164,16 +164,16 @@ module.exports = {
164
164
  }) : [],
165
165
  ).concat(
166
166
  config.isProd && config.shopwareVersion !== '6.6' ?
167
- new TwigAssetEmitterPlugin({
168
- includes: ['js', 'css'],
169
- ignoreFiles: [/.*icons.*\.js/],
170
- template: {
171
- admin: {
172
- assetUrl: config.assetUrl,
173
- filename: 'index.html.twig',
167
+ new TwigAssetEmitterPlugin({
168
+ includes: ['js', 'css'],
169
+ ignoreFiles: [/.*icons.*\.js/],
170
+ template: {
171
+ admin: {
172
+ assetUrl: config.assetUrl,
173
+ filename: 'index.html.twig',
174
+ },
174
175
  },
175
- },
176
- }) : [],
176
+ }) : [],
177
177
  ),
178
178
 
179
179
  optimization: {