-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: throw error when not using server import
- Loading branch information
1 parent
f93ce11
commit 27629d6
Showing
7 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ build | |
public/build | ||
.env | ||
|
||
*.d.ts | ||
index.server.js | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
throw new Error( | ||
'Can\'t import from "remix-graphql" directly, use "remix-graphql/index.server" instead' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./dist"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("./dist/index.js"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,18 +10,20 @@ | |
"type": "git", | ||
"url": "https://github.com/thomasheyenbrock/remix-graphql.git" | ||
}, | ||
"main": "index.server.js", | ||
"types": "index.server.d.ts", | ||
"main": "index.js", | ||
"types": "dist/index.d.ts", | ||
"author": "Thomas Heyenbrock <[email protected]>", | ||
"license": "MIT", | ||
"files": [ | ||
"dist", | ||
"index.js", | ||
"index.server.js", | ||
"*.d.ts" | ||
"index.server.d.ts" | ||
], | ||
"scripts": { | ||
"build": "yarn build:clean && yarn build:code && yarn build:types", | ||
"build:clean": "rm -f *.d.ts index.server.js", | ||
"build:code": "esbuild src/index.server.ts --bundle --platform=node --external:graphql --external:graphql-helix --external:remix --outfile=index.server.js", | ||
"build:clean": "rm -rf dist", | ||
"build:code": "esbuild src/index.ts --bundle --platform=node --external:graphql --external:graphql-helix --external:remix --outfile=dist/index.js", | ||
"build:types": "tsc", | ||
"format": "prettier --write .", | ||
"prepare": "install-peers && remix setup node" | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters