@modern-js/plugin-data-loader 0.0.0-next-20240725030133 → 0.0.0-next-20240726022500

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.
@@ -42,7 +42,7 @@ async function loader(source) {
42
42
  }
43
43
  return pre;
44
44
  }, {});
45
- if (!options.loaderId) {
45
+ if (!options.loaderId || options.retain) {
46
46
  return source;
47
47
  }
48
48
  if (options.clientData) {
@@ -35,7 +35,7 @@ function _loader() {
35
35
  }
36
36
  return pre;
37
37
  }, {});
38
- if (!options.loaderId) {
38
+ if (!options.loaderId || options.retain) {
39
39
  return [
40
40
  2,
41
41
  source
@@ -19,7 +19,7 @@ async function loader(source) {
19
19
  }
20
20
  return pre;
21
21
  }, {});
22
- if (!options.loaderId) {
22
+ if (!options.loaderId || options.retain) {
23
23
  return source;
24
24
  }
25
25
  if (options.clientData) {
@@ -7,6 +7,7 @@ type Context = {
7
7
  action: boolean;
8
8
  inline: boolean;
9
9
  routeId: string;
10
+ retain: boolean;
10
11
  };
11
12
  export default function loader(this: LoaderContext<Context>, source: string): Promise<string | Buffer | undefined>;
12
13
  export {};
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-20240725030133",
18
+ "version": "0.0.0-next-20240726022500",
19
19
  "engines": {
20
20
  "node": ">=16.2.0"
21
21
  },
@@ -49,8 +49,8 @@
49
49
  "@babel/core": "^7.24.7",
50
50
  "path-to-regexp": "^6.2.0",
51
51
  "@swc/helpers": "0.5.3",
52
- "@modern-js/utils": "0.0.0-next-20240725030133",
53
- "@modern-js/runtime-utils": "0.0.0-next-20240725030133"
52
+ "@modern-js/utils": "0.0.0-next-20240726022500",
53
+ "@modern-js/runtime-utils": "0.0.0-next-20240726022500"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/babel__core": "^7.20.5",
@@ -66,11 +66,11 @@
66
66
  "webpack": "^5.93.0",
67
67
  "react": "^18",
68
68
  "react-dom": "^18",
69
- "@modern-js/types": "0.0.0-next-20240725030133",
70
- "@scripts/build": "0.0.0-next-20240725030133",
71
- "@scripts/jest-config": "0.0.0-next-20240725030133",
72
- "@modern-js/core": "0.0.0-next-20240725030133",
73
- "@modern-js/server-core": "0.0.0-next-20240725030133"
69
+ "@modern-js/core": "0.0.0-next-20240726022500",
70
+ "@modern-js/server-core": "0.0.0-next-20240726022500",
71
+ "@scripts/build": "0.0.0-next-20240726022500",
72
+ "@scripts/jest-config": "0.0.0-next-20240726022500",
73
+ "@modern-js/types": "0.0.0-next-20240726022500"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": ">=17.0.0"