Skip to content

Commit

Permalink
Switch to es6 exports
Browse files Browse the repository at this point in the history
  • Loading branch information
weotch committed Sep 9, 2024
1 parent 68ef6ca commit 4f2fcbb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/contentful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Image and video renderer for Contentful assets.",
"author": "Bukwild <[email protected]>",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
1 change: 1 addition & 0 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Image and video renderer for Next.js projects",
"author": "Bukwild <[email protected]>",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Image and video renderer for React projects",
"author": "Bukwild <[email protected]>",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
1 change: 1 addition & 0 deletions packages/sanity-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Image and video renderer for Sanity + Next.js projects",
"author": "Bukwild <[email protected]>",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
8 changes: 6 additions & 2 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"target": "ESNext",
"module": "ESNext",
"declaration": true,
"outDir": "./dist",
"strict": true,
Expand All @@ -10,6 +10,10 @@
// Required for importing packages, like React, that have `export =`
"esModuleInterop": true,

// Recommendations for greater interoperability
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",

// Fixes build failures when dependent types have errors, like:
// node_modules/next/dist/shared/lib/get-img-props.d.ts:70
"skipLibCheck": true,
Expand Down

0 comments on commit 4f2fcbb

Please sign in to comment.