@jsenv/plugin-preact 0.0.3 → 0.0.6

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-preact",
3
- "version": "0.0.3",
3
+ "version": "0.0.6",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@babel/plugin-transform-react-jsx": "7.17.3",
23
- "@jsenv/utils": "1.1.0",
23
+ "@jsenv/utils": "1.4.0",
24
24
  "@jsenv/url-meta": "6.2.0"
25
25
  },
26
26
  "devDependencies": {
@@ -36,19 +36,19 @@ export const jsenvPluginPreact = ({
36
36
  return {
37
37
  name: "jsenv:preact",
38
38
  appliesDuring: "*",
39
- resolve: {
40
- js_import_export: (reference, { resolveReference }) => {
39
+ resolveUrl: {
40
+ js_import_export: (reference, context) => {
41
41
  if (
42
42
  reference.specifier === "react" ||
43
43
  reference.specifier === "react-dom"
44
44
  ) {
45
45
  reference.specifier = "preact/compat"
46
- return resolveReference(reference).url
46
+ return context.resolveReference(reference).url
47
47
  }
48
48
  return null
49
49
  },
50
50
  },
51
- transform: {
51
+ transformUrlContent: {
52
52
  html: ({ content }, { scenario, referenceUtils }) => {
53
53
  if (!preactDevtoolsDuringBuild && scenario === "build") {
54
54
  return null