@pixolith/webpack-sw6-config 7.4.1 → 7.4.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": "7.4.1",
4
+ "version": "7.4.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": "24d04186a9d7f5cc7e7571174040088744c2a19a",
24
+ "gitHead": "332a71bb95071a3c41d29daaaa815bf9809e6e7e",
25
25
  "dependencies": {
26
26
  "@babel/core": "^7.22.1",
27
27
  "@babel/eslint-parser": "^7.21.8",
@@ -42,11 +42,20 @@ module.exports = {
42
42
  test: /(\.scss|\.css)$/,
43
43
  use: [
44
44
  isProd ? ExtractCssChunks.loader : 'style-loader',
45
+ {
46
+ loader: 'string-replace-loader',
47
+ options: {
48
+ search: 'ASSET_URL/',
49
+ replace: ASSET_URL,
50
+ flags: 'g',
51
+ },
52
+ },
45
53
  {
46
54
  loader: 'css-loader',
47
55
  options: {
48
56
  importLoaders: 1,
49
57
  sourceMap: !isProd,
58
+ url: false // set to false, so we can directly search for the asset url and replace it. sadly we need this for development - cdn works fine before
50
59
  },
51
60
  },
52
61
  //{
@@ -61,13 +70,10 @@ module.exports = {
61
70
  },
62
71
  },
63
72
  },
64
- {
65
- loader: 'resolve-url-loader',
66
- },
67
73
  {
68
74
  loader: 'sass-loader',
69
75
  options: {
70
- sourceMap: true,
76
+ sourceMap: !isProd,
71
77
  additionalData: `$asset_url: '${ASSET_URL}';`,
72
78
  sassOptions: {
73
79
  quietDeps: true,