@pixolith/webpack-sw6-config 6.1.0 → 6.1.3

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.0",
4
+ "version": "6.1.3",
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": "150f7be4ac38fe9f487918e61be4d1fcf22a72f8",
24
+ "gitHead": "fa5269a10c6cf71c527cf59297190c7bf485b000",
25
25
  "dependencies": {
26
26
  "@babel/core": "^7.16.12",
27
27
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -4,6 +4,7 @@ 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
8
  ExtractCssChunks = require('extract-css-chunks-webpack-plugin'),
8
9
  AssetsCopyPlugin = require('@pixolith/webpack-assets-copy-plugin'),
9
10
  isProd = process.env.NODE_ENV === 'production',
@@ -108,9 +109,9 @@ module.exports = {
108
109
  {
109
110
  loader: SvgStorePlugin.loader,
110
111
  options: {
111
- name: 'sprite/sprite.svg',
112
+ name: 'sprite/sprite_uses.svg',
112
113
  iconName: '[name]',
113
- onlySymbols: true,
114
+ onlySymbols: false,
114
115
  },
115
116
  },
116
117
  {
@@ -149,7 +150,7 @@ module.exports = {
149
150
  new HookPlugin({
150
151
  beforeCompile(compiler, callback) {
151
152
  let path = Path.join(process.cwd(), publicPath, 'sprite'),
152
- filename = 'sprite.svg',
153
+ filename = 'sprite_uses.svg',
153
154
  exists = Fs.existsSync(Path.join(path, filename));
154
155
 
155
156
  if (!exists) {
@@ -170,13 +171,13 @@ module.exports = {
170
171
  let spriteInputPath = Path.join(
171
172
  process.cwd(),
172
173
  publicPath,
173
- 'sprite/sprite.svg',
174
+ 'sprite/sprite_uses.svg',
174
175
  );
175
176
  let spriteOutputPath = Path.join(
176
177
  process.cwd(),
177
- 'custom/plugins/PxswTheme/src/Resources/views/administration',
178
+ spritePath,
178
179
  ),
179
- spritOutputFilename = '_sprite.svg';
180
+ spritOutputFilename = '_sprite_uses.svg';
180
181
 
181
182
  let exists = Fs.existsSync(spriteOutputPath);
182
183
 
@@ -195,7 +196,7 @@ module.exports = {
195
196
  }),
196
197
  new AssetsCopyPlugin({
197
198
  includes: ['js', 'css'],
198
- ignoreFiles: [/[-\w.]*.hot-update.js/, /sprite\/sprite.svg/],
199
+ ignoreFiles: [/[-\w.]*.hot-update.js/, /sprite\/sprite_uses.svg/],
199
200
  files: [
200
201
  {
201
202
  from: publicPath,
@@ -3,6 +3,7 @@ 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
7
  ChangeCase = require('change-case'),
7
8
  Consola = require('consola'),
8
9
  TwigAssetEmitterPlugin = require('@pixolith/webpack-twig-assets-emitter-plugin'),
@@ -10,7 +11,7 @@ const Path = require('path'),
10
11
  isProd = process.env.NODE_ENV === 'production',
11
12
  isModern = process.env.MODE === 'modern',
12
13
  SvgStorePlugin = require('@pixolith/external-svg-sprite-loader'),
13
- publicPath = 'public',
14
+ publicPath = process.env.PUBLIC_PATH,
14
15
  ASSET_URL = process.env.ASSET_URL || '/',
15
16
  HookPlugin = require('@pixolith/webpack-hook-plugin'),
16
17
  outputConfig = {
@@ -207,7 +208,7 @@ module.exports = {
207
208
  );
208
209
  let spriteOutputPath = Path.join(
209
210
  process.cwd(),
210
- 'custom/plugins/PxswTheme/src/Resources/views/storefront',
211
+ spritePath,
211
212
  ),
212
213
  spritOutputFilename = '_sprite.svg';
213
214