@pixolith/webpack-sw6-config 6.1.1 → 6.1.4

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": "6.1.1",
4
+ "version": "6.1.4",
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": "02eecbeccef698937d5930a1ed9ef2e0a5abddf5",
24
+ "gitHead": "191cbc7ae88b565da1449eb915c8ab1572d7b9cf",
25
25
  "dependencies": {
26
26
  "@babel/core": "^7.16.12",
27
27
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -4,7 +4,9 @@ const Path = require('path'),
4
4
  changeCase = require('change-case'),
5
5
  entry = require('webpack-glob-entry'),
6
6
  publicPath = process.env.PUBLIC_PATH,
7
- spritePath = process.env.SPRITE_PATH ?? 'custom/plugins/PxswTheme/src/Resources/views/administration';
7
+ spritePath = process.env.SPRITE_PATH ?? 'custom/plugins/PxswTheme/src/Resources/views/administration',
8
+ swNodePath = process.env.SW_NODE_PATH ?? 'vendor/shopware/administration/Resources/app/administration/src',
9
+ swAliasPath = process.env.SW_ALIAS_PATH ?? 'vendor/shopware/administration/Resources/app/administration/src',
8
10
  ExtractCssChunks = require('extract-css-chunks-webpack-plugin'),
9
11
  AssetsCopyPlugin = require('@pixolith/webpack-assets-copy-plugin'),
10
12
  isProd = process.env.NODE_ENV === 'production',
@@ -58,13 +60,13 @@ module.exports = {
58
60
  Path.resolve(privatePath, 'js'),
59
61
  Path.resolve(
60
62
  process.cwd(),
61
- 'vendor/shopware/administration/Resources/app/administration/src',
63
+ swNodePath,
62
64
  ),
63
65
  ],
64
66
  alias: {
65
67
  src: Path.join(
66
68
  process.cwd(),
67
- 'vendor/shopware/administration/Resources/app/administration/src',
69
+ swAliasPath,
68
70
  ),
69
71
  },
70
72
  },
@@ -109,9 +111,9 @@ module.exports = {
109
111
  {
110
112
  loader: SvgStorePlugin.loader,
111
113
  options: {
112
- name: 'sprite/sprite.svg',
114
+ name: 'sprite/sprite_uses.svg',
113
115
  iconName: '[name]',
114
- onlySymbols: true,
116
+ onlySymbols: false,
115
117
  },
116
118
  },
117
119
  {
@@ -150,7 +152,7 @@ module.exports = {
150
152
  new HookPlugin({
151
153
  beforeCompile(compiler, callback) {
152
154
  let path = Path.join(process.cwd(), publicPath, 'sprite'),
153
- filename = 'sprite.svg',
155
+ filename = 'sprite_uses.svg',
154
156
  exists = Fs.existsSync(Path.join(path, filename));
155
157
 
156
158
  if (!exists) {
@@ -171,13 +173,13 @@ module.exports = {
171
173
  let spriteInputPath = Path.join(
172
174
  process.cwd(),
173
175
  publicPath,
174
- 'sprite/sprite.svg',
176
+ 'sprite/sprite_uses.svg',
175
177
  );
176
178
  let spriteOutputPath = Path.join(
177
179
  process.cwd(),
178
180
  spritePath,
179
181
  ),
180
- spritOutputFilename = '_sprite.svg';
182
+ spritOutputFilename = '_sprite_uses.svg';
181
183
 
182
184
  let exists = Fs.existsSync(spriteOutputPath);
183
185
 
@@ -196,7 +198,7 @@ module.exports = {
196
198
  }),
197
199
  new AssetsCopyPlugin({
198
200
  includes: ['js', 'css'],
199
- ignoreFiles: [/[-\w.]*.hot-update.js/, /sprite\/sprite.svg/],
201
+ ignoreFiles: [/[-\w.]*.hot-update.js/, /sprite\/sprite_uses.svg/],
200
202
  files: [
201
203
  {
202
204
  from: publicPath,
@@ -3,7 +3,9 @@ const Path = require('path'),
3
3
  ExtractCssChunks = require('extract-css-chunks-webpack-plugin'),
4
4
  privatePath = process.env.PLUGIN_PATH,
5
5
  vendorPath = process.env.VENDOR_PATH,
6
- spritePath = process.env.SPRITE_PATH ?? 'custom/plugins/PxswTheme/src/Resources/views/storefront';
6
+ spritePath = process.env.SPRITE_PATH ?? 'custom/plugins/PxswTheme/src/Resources/views/storefront',
7
+ swNodePath = process.env.SW_NODE_PATH ?? './vendor/shopware/storefront/Resources/app/storefront/vendor',
8
+ swAliasPath = process.env.SW_ALIAS_PATH ?? '/vendor/shopware/storefront/Resources/app/storefront/src',
7
9
  ChangeCase = require('change-case'),
8
10
  Consola = require('consola'),
9
11
  TwigAssetEmitterPlugin = require('@pixolith/webpack-twig-assets-emitter-plugin'),
@@ -65,14 +67,12 @@ module.exports = {
65
67
  modules: [
66
68
  'node_modules',
67
69
  Path.resolve(privatePath, 'js'),
68
- Path.resolve(
69
- './vendor/shopware/storefront/Resources/app/storefront/vendor',
70
- ),
70
+ Path.resolve(swNodePath),
71
71
  ],
72
72
  alias: {
73
73
  src: Path.join(
74
74
  process.cwd(),
75
- '/vendor/shopware/storefront/Resources/app/storefront/src',
75
+ swAliasPath,
76
76
  ),
77
77
  },
78
78
  },