@pixolith/webpack-sw6-config 6.0.7 → 6.1.2
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.
|
|
4
|
+
"version": "6.1.2",
|
|
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": "d04a0e3b3b31fcdebae568a69dcb33a38cc113b2",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/core": "^7.16.12",
|
|
27
27
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@pixolith/webpack-assets-copy-plugin": "^6.0.1",
|
|
38
38
|
"@pixolith/webpack-filename-linter-plugin": "^6.0.1",
|
|
39
39
|
"@pixolith/webpack-hook-plugin": "^6.0.1",
|
|
40
|
-
"@pixolith/webpack-twig-assets-emitter-plugin": "^6.0
|
|
40
|
+
"@pixolith/webpack-twig-assets-emitter-plugin": "^6.1.0",
|
|
41
41
|
"@pixolith/webpack-watcher": "^6.0.1",
|
|
42
42
|
"autoprefixer": "^9.7.4",
|
|
43
43
|
"babel-eslint": "^10.0.3",
|
|
@@ -3,7 +3,8 @@ const Path = require('path'),
|
|
|
3
3
|
privatePath = process.env.PLUGIN_PATH,
|
|
4
4
|
changeCase = require('change-case'),
|
|
5
5
|
entry = require('webpack-glob-entry'),
|
|
6
|
-
publicPath =
|
|
6
|
+
publicPath = 'public',
|
|
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/
|
|
112
|
+
name: 'sprite/sprite_uses.svg',
|
|
112
113
|
iconName: '[name]',
|
|
113
|
-
onlySymbols:
|
|
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 = '
|
|
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/
|
|
174
|
+
'sprite/sprite_uses.svg',
|
|
174
175
|
);
|
|
175
176
|
let spriteOutputPath = Path.join(
|
|
176
177
|
process.cwd(),
|
|
177
|
-
|
|
178
|
+
spritePath,
|
|
178
179
|
),
|
|
179
|
-
spritOutputFilename = '
|
|
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\/
|
|
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 =
|
|
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
|
-
|
|
211
|
+
spritePath,
|
|
211
212
|
),
|
|
212
213
|
spritOutputFilename = '_sprite.svg';
|
|
213
214
|
|