Open FunctionalMetatable opened 2 years ago
you could use cross-fetch
Nvm, node-fetch was pinned at 3.6.
Still writing TS
I used tsup for ESM and TS in my package,
{
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --minify --dts",
"build:watch": "tsup src/index.ts --format cjs,esm --minify --dts --watch"
},
"devDependencies": {
"@types/node": "^17.0.10",
"tsup": "^5.11.11",
"typescript": "^4.5.5"
},
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"type": "module"
}
(unimportant parts removed)
then you should be able to replace file extensions, switch require
for import
and then it will work with both ESM and CJS at the same time (even if you only specify index.ts
it does go through each file since index.ts
uses ScratchSession which uses the other files)
If you're making your own one, we should merge them together
I guess ok! I thought the readme said discontinued or something
said discontinued because I wasn't working on the main repo, but I was working on the ts repo
ohh there's a ts repo?!
I can merge it if you want
I can merge it if you want
don't. I'll merge to yours soon. Tbh there should be a whole scratch community org ngl
There is a scratch community org. It's called LLK. You mean like an org for everyone to put true it things in? That would place a lot of trust on the owner but it is a good idea. Also I think merging into yours is better since you have already got the forum topic and most of the things, also a bit of docs and cloud support too
scratch community org. It's called LLK
Thats the official ST one
Will keep CJS as well, using rollup. In progress :D
Also this is kinda broken bc node-fetch esm