-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: importing/requiring under certain setups was not working
fixes #4
- Loading branch information
Showing
13 changed files
with
464 additions
and
423 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { TypeScriptConfig } from '@beemo/driver-typescript' | ||
|
||
const config: TypeScriptConfig = { | ||
compilerOptions: { | ||
allowJs: true, | ||
}, | ||
include: ['src'], | ||
} | ||
|
||
export default config |
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 |
---|---|---|
|
@@ -50,3 +50,5 @@ node_modules/ | |
|
||
.DS_Store | ||
*.local | ||
|
||
tsconfig.json |
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 |
---|---|---|
|
@@ -58,6 +58,10 @@ | |
"./esm/*": { | ||
"import": "./esm/*.js" | ||
}, | ||
"./data/*": { | ||
"import": "./data/*", | ||
"require": "./data/*" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"main": "esm/main.js", | ||
|
@@ -73,7 +77,7 @@ | |
"scripts": { | ||
"build": "yarn build:cjs && yarn build:esm && yarn build:umd", | ||
"build:cjs": "yarn rrun tsc --outDir cjs --module commonjs --target es2022", | ||
"build:esm": "yarn rrun tsc --outDir esm --module esnext --target es2022", | ||
"build:esm": "yarn rrun tsc --outDir esm --module esnext --target es2022 && echo '{\"name\": \"gpt-tokenizer\", \"type\": \"module\"}' > ./esm/package.json", | ||
"build:umd": "beemo webpack --entry='./src/main.ts' --env 'outDir=dist' --env 'moduleTarget=umd' --env 'engineTarget=web' --env 'codeTarget=es2022' --env 'name=GPT3Encoder' --env 'export=default' --env 'filename=gpt3encoder.js'", | ||
"clean": "git clean -dfX --exclude=node_modules src && beemo typescript:sync-project-refs", | ||
"format": "yarn rrun prettier --write \"./{src,tests,.config}/**/!(*.d).{.js,jsx,ts,tsx,json,md}\"", | ||
|
@@ -108,7 +112,7 @@ | |
}, | ||
"devDependencies": { | ||
"@niieani/scaffold": "^1.6.7", | ||
"tsx": "^3.12.6" | ||
"tsx": "^3.12.7" | ||
}, | ||
"packageManager": "[email protected]", | ||
"publishConfig": { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.