@docusaurus/plugin-ideal-image 4.0.0-canary-6929 → 4.0.0-canary-6930

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/lib/index.js CHANGED
@@ -46,6 +46,8 @@ function pluginIdealImage(context, options) {
46
46
  test: /\.(?:png|jpe?g)$/i,
47
47
  // Ideal images are JS modules, not assets
48
48
  type: 'javascript/auto',
49
+ // new URL('./img.png', import.meta.url) references the image asset URL
50
+ dependency: { not: 'url' },
49
51
  // We don't want to use the image loader for non-React source code
50
52
  // ie we don't want to use ideal image loader for CSS files...
51
53
  // See https://github.com/facebook/docusaurus/issues/10862
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-ideal-image",
3
- "version": "4.0.0-canary-6929",
3
+ "version": "4.0.0-canary-6930",
4
4
  "description": "Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder).",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-ideal-image.d.ts",
@@ -14,19 +14,19 @@
14
14
  },
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@docusaurus/core": "4.0.0-canary-6929",
18
- "@docusaurus/lqip-loader": "4.0.0-canary-6929",
17
+ "@docusaurus/core": "4.0.0-canary-6930",
18
+ "@docusaurus/lqip-loader": "4.0.0-canary-6930",
19
19
  "@docusaurus/responsive-loader": "^1.7.1",
20
- "@docusaurus/theme-translations": "4.0.0-canary-6929",
21
- "@docusaurus/types": "4.0.0-canary-6929",
22
- "@docusaurus/utils": "4.0.0-canary-6929",
23
- "@docusaurus/utils-validation": "4.0.0-canary-6929",
20
+ "@docusaurus/theme-translations": "4.0.0-canary-6930",
21
+ "@docusaurus/types": "4.0.0-canary-6930",
22
+ "@docusaurus/utils": "4.0.0-canary-6930",
23
+ "@docusaurus/utils-validation": "4.0.0-canary-6930",
24
24
  "sharp": "^0.35.1",
25
25
  "tslib": "^2.8.1",
26
26
  "webpack": "^5.111.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@docusaurus/module-type-aliases": "4.0.0-canary-6929"
29
+ "@docusaurus/module-type-aliases": "4.0.0-canary-6930"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "jimp": "^1.6.1",
package/src/index.ts CHANGED
@@ -65,6 +65,8 @@ export default function pluginIdealImage(
65
65
  test: /\.(?:png|jpe?g)$/i,
66
66
  // Ideal images are JS modules, not assets
67
67
  type: 'javascript/auto',
68
+ // new URL('./img.png', import.meta.url) references the image asset URL
69
+ dependency: {not: 'url'},
68
70
  // We don't want to use the image loader for non-React source code
69
71
  // ie we don't want to use ideal image loader for CSS files...
70
72
  // See https://github.com/facebook/docusaurus/issues/10862