Skip to content

Commit

Permalink
build(compiler): use moduleResolution bundler for demo & target es202…
Browse files Browse the repository at this point in the history
…3 for all
  • Loading branch information
miguelgrc committed Jul 15, 2024
1 parent a2fb7fe commit 2f12b03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions formule-demo/cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["ES2021", "dom"],
"target": "ES2023",
"lib": ["ES2023", "dom"],
"types": ["cypress"]
},
"include": ["**/*.ts"]
Expand Down
9 changes: 3 additions & 6 deletions formule-demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"compilerOptions": {
"target": "ES2020",
"target": "ES2023",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true, // FIXME: We can remove this once we change moduleResolution to bundler

/* Bundler mode */
// FIXME: change back to bundler once a new version of cypress fixes this https://github.com/cypress-io/cypress/issues/27731
// we would probably be able to remove "module": "./dist/react-formule.js" from formule's package.json then
"moduleResolution": "node",
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"files": [
"dist"
],
"module": "./dist/react-formule.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "ES2020",
"target": "ES2023",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"module": "ESNext",

/* Bundler mode */
Expand All @@ -23,7 +23,7 @@
"skipLibCheck": true,

"allowJs": true,
"noImplicitAny": false // TODO: Remove eventually
"noImplicitAny": false // TODO: Remove eventually
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down

0 comments on commit 2f12b03

Please sign in to comment.