@cedarjs/prerender 4.0.0-canary.13784 → 4.0.0-canary.13785
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAndImport.d.ts","sourceRoot":"","sources":["../../src/build-and-import/buildAndImport.ts"],"names":[],"mappings":"AAoCA,UAAU,OAAO;IACf,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"buildAndImport.d.ts","sourceRoot":"","sources":["../../src/build-and-import/buildAndImport.ts"],"names":[],"mappings":"AAoCA,UAAU,OAAO;IACf,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAqJlD"}
|
|
@@ -78,6 +78,24 @@ async function buildAndImport(options) {
|
|
|
78
78
|
...getPathsFromTypeScriptConfig(tsConfigs.web, webBase)
|
|
79
79
|
]
|
|
80
80
|
}),
|
|
81
|
+
// Handle JSON imports (e.g. .cedar/gqlorm-schema.json)
|
|
82
|
+
{
|
|
83
|
+
name: "json",
|
|
84
|
+
transform(code, id) {
|
|
85
|
+
if (!id.endsWith(".json")) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
const parsed = JSON.parse(code);
|
|
90
|
+
return {
|
|
91
|
+
code: `export default ${JSON.stringify(parsed)}`,
|
|
92
|
+
map: { mappings: "" }
|
|
93
|
+
};
|
|
94
|
+
} catch {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
81
99
|
ignoreHtmlAndCssImportsPlugin(),
|
|
82
100
|
cellTransformPlugin(),
|
|
83
101
|
cedarjsRoutesAutoLoaderPlugin(),
|
|
@@ -108,6 +108,24 @@ async function buildAndImport(options) {
|
|
|
108
108
|
...(0, import_internal.getPathsFromTypeScriptConfig)(tsConfigs.web, webBase)
|
|
109
109
|
]
|
|
110
110
|
}),
|
|
111
|
+
// Handle JSON imports (e.g. .cedar/gqlorm-schema.json)
|
|
112
|
+
{
|
|
113
|
+
name: "json",
|
|
114
|
+
transform(code, id) {
|
|
115
|
+
if (!id.endsWith(".json")) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
const parsed = JSON.parse(code);
|
|
120
|
+
return {
|
|
121
|
+
code: `export default ${JSON.stringify(parsed)}`,
|
|
122
|
+
map: { mappings: "" }
|
|
123
|
+
};
|
|
124
|
+
} catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
111
129
|
(0, import_rollup_plugin_cedarjs_ignore_html_and_css_imports.ignoreHtmlAndCssImportsPlugin)(),
|
|
112
130
|
(0, import_rollup_plugin_cedarjs_cell.cellTransformPlugin)(),
|
|
113
131
|
(0, import_rollup_plugin_cedarjs_routes_auto_loader.cedarjsRoutesAutoLoaderPlugin)(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/prerender",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.13785+804c70218b",
|
|
4
4
|
"description": "CedarJS prerender",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"@babel/generator": "7.29.1",
|
|
72
72
|
"@babel/parser": "7.29.2",
|
|
73
73
|
"@babel/traverse": "7.29.0",
|
|
74
|
-
"@cedarjs/babel-config": "4.0.0-canary.
|
|
75
|
-
"@cedarjs/project-config": "4.0.0-canary.
|
|
76
|
-
"@cedarjs/router": "4.0.0-canary.
|
|
77
|
-
"@cedarjs/structure": "4.0.0-canary.
|
|
78
|
-
"@cedarjs/vite": "4.0.0-canary.
|
|
79
|
-
"@cedarjs/web": "4.0.0-canary.
|
|
74
|
+
"@cedarjs/babel-config": "4.0.0-canary.13785",
|
|
75
|
+
"@cedarjs/project-config": "4.0.0-canary.13785",
|
|
76
|
+
"@cedarjs/router": "4.0.0-canary.13785",
|
|
77
|
+
"@cedarjs/structure": "4.0.0-canary.13785",
|
|
78
|
+
"@cedarjs/vite": "4.0.0-canary.13785",
|
|
79
|
+
"@cedarjs/web": "4.0.0-canary.13785",
|
|
80
80
|
"@rollup/plugin-alias": "5.1.1",
|
|
81
81
|
"@rollup/plugin-commonjs": "28.0.9",
|
|
82
82
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"vite-node": "3.2.4"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@cedarjs/framework-tools": "4.0.0-canary.
|
|
98
|
+
"@cedarjs/framework-tools": "4.0.0-canary.13785",
|
|
99
99
|
"@types/mime-types": "2.1.4",
|
|
100
100
|
"@types/react": "^18.2.55",
|
|
101
101
|
"babel-plugin-tester": "11.0.4",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"react": "react",
|
|
120
120
|
"react-dom": "react-dom"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "804c70218bec0b721df7c9f019ca3921bdde096c"
|
|
123
123
|
}
|