@cedarjs/prerender 1.0.0-canary.12576 → 1.0.0-canary.12578

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,CA0HlD"}
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,CAmIlD"}
@@ -7,7 +7,7 @@ import replace from "@rollup/plugin-replace";
7
7
  import { rollup } from "rollup";
8
8
  import { swc } from "rollup-plugin-swc3";
9
9
  import unimportPlugin from "unimport/unplugin";
10
- import { getConfig, getPaths } from "@cedarjs/project-config";
10
+ import { getConfig, getPaths, projectIsEsm } from "@cedarjs/project-config";
11
11
  import {
12
12
  getPathsFromTypeScriptConfig,
13
13
  parseTypeScriptConfigFiles
@@ -41,6 +41,7 @@ async function buildAndImport(options) {
41
41
  if (!fs.existsSync(outDir)) {
42
42
  fs.mkdirSync(outDir, { recursive: true });
43
43
  }
44
+ const isEsm = projectIsEsm();
44
45
  const build = await rollup({
45
46
  input: [options.filepath],
46
47
  output: {
@@ -92,8 +93,13 @@ async function buildAndImport(options) {
92
93
  as: "React",
93
94
  from: "react"
94
95
  },
96
+ // import { gql } from 'graphql-tag'
97
+ !useTrustedDocumentsGqlTag && isEsm && {
98
+ name: "gql",
99
+ from: "graphql-tag"
100
+ },
95
101
  // import gql from 'graphql-tag'
96
- !useTrustedDocumentsGqlTag && {
102
+ !useTrustedDocumentsGqlTag && !isEsm && {
97
103
  name: "default",
98
104
  as: "gql",
99
105
  from: "graphql-tag"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/prerender",
3
- "version": "1.0.0-canary.12576+f53dceaf0",
3
+ "version": "1.0.0-canary.12578+46a86a85d",
4
4
  "description": "RedwoodJS prerender",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,12 +44,12 @@
44
44
  "@babel/generator": "7.27.5",
45
45
  "@babel/parser": "7.27.5",
46
46
  "@babel/traverse": "7.27.4",
47
- "@cedarjs/babel-config": "1.0.0-canary.12576",
48
- "@cedarjs/project-config": "1.0.0-canary.12576",
49
- "@cedarjs/router": "1.0.0-canary.12576",
50
- "@cedarjs/structure": "1.0.0-canary.12576",
51
- "@cedarjs/vite": "1.0.0-canary.12576",
52
- "@cedarjs/web": "1.0.0-canary.12576",
47
+ "@cedarjs/babel-config": "1.0.0-canary.12578",
48
+ "@cedarjs/project-config": "1.0.0-canary.12578",
49
+ "@cedarjs/router": "1.0.0-canary.12578",
50
+ "@cedarjs/structure": "1.0.0-canary.12578",
51
+ "@cedarjs/vite": "1.0.0-canary.12578",
52
+ "@cedarjs/web": "1.0.0-canary.12578",
53
53
  "@rollup/plugin-alias": "5.1.1",
54
54
  "@rollup/plugin-commonjs": "28.0.6",
55
55
  "@rollup/plugin-node-resolve": "16.0.1",
@@ -68,7 +68,7 @@
68
68
  "vite-node": "3.2.4"
69
69
  },
70
70
  "devDependencies": {
71
- "@cedarjs/framework-tools": "1.0.0-canary.12576",
71
+ "@cedarjs/framework-tools": "1.0.0-canary.12578",
72
72
  "@types/mime-types": "2.1.4",
73
73
  "@types/react": "^18.2.55",
74
74
  "babel-plugin-tester": "11.0.4",
@@ -86,5 +86,5 @@
86
86
  "react": "react",
87
87
  "react-dom": "react-dom"
88
88
  },
89
- "gitHead": "f53dceaf026fe0ac6e8a298958b09f7b616414be"
89
+ "gitHead": "46a86a85df7c41b888efd35f9903776de84d1e49"
90
90
  }