Skip to content

Commit

Permalink
test: add reproduction repo for module export
Browse files Browse the repository at this point in the history
Repo is copied from #816 inside to test in future
  • Loading branch information
BANOnotIT committed Apr 20, 2024
1 parent 1f8e18c commit f934a16
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 5 deletions.
21 changes: 17 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"actualize-issue-templates": "npx tsx ./tools/actualize-issue-templates.ts"
},
"workspaces": [
"packages/*"
"packages/*",
"test/esm-bundler-import-repo"
],
"author": "artalar",
"license": "MIT",
Expand Down
10 changes: 10 additions & 0 deletions test/esm-bundle-import-repo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#reatom esm issue
Reproduce for ESM-related reatom issue

This repo is used to reproduce problems with import of "module" exported files.

```
yarn
yarn build
yarn start
```
17 changes: 17 additions & 0 deletions test/esm-bundle-import-repo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "check-ts-issue",
"version": "1.0.0",
"main": "index.js",
"type": "module",
"license": "MIT",
"dependencies": {
"@reatom/framework": "^3.4.37"
},
"scripts": {
"build": "tsc -p tsconfig.json",
"start": "node ./dist/hello.js"
},
"devDependencies": {
"typescript": "5.4.5"
}
}
4 changes: 4 additions & 0 deletions test/esm-bundle-import-repo/src/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {atom, createCtx} from '@reatom/framework'
const me = atom('hello', 'me')
const ctx = createCtx()
console.log('mol:', ctx.get(me))
14 changes: 14 additions & 0 deletions test/esm-bundle-import-repo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"rootDir": "src",
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Bundler",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"outDir": "./dist",
},
}

0 comments on commit f934a16

Please sign in to comment.