Skip to content

Commit

Permalink
fix: Remove ESM build (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn authored Jul 5, 2023
1 parent 3fce1cb commit 22d9f27
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
4 changes: 3 additions & 1 deletion packages/next-intl/link.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export {default} from './dist/link';
import Link from './dist/link';

export = Link;
4 changes: 3 additions & 1 deletion packages/next-intl/middleware.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export {default} from './dist/middleware';
import Middleware from './dist/middleware';

export = Middleware;
11 changes: 3 additions & 8 deletions packages/next-intl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,30 @@
"build": "tsup",
"test": "TZ=Europe/Berlin vitest",
"lint": "eslint src test && tsc --noEmit",
"prepublishOnly": "turbo test && turbo lint && turbo build && cp ../../README.md .",
"prepublishOnly": "CI=true turbo test && turbo lint && turbo build && cp ../../README.md .",
"postpublish": "git checkout . && rm ./README.md"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"exports": {
".": {
"react-server": {
"import": "./dist/react-server/index.mjs",
"default": "./dist/react-server/index.js"
},
"import": "./dist/index.mjs",
"default": "./dist/index.js"
},
"./server": {
"import": "./dist/server/index.mjs",
"default": "./dist/server/index.js"
},
"./client": {
"import": "./dist/client/index.mjs",
"default": "./dist/client/index.js"
},
"./link": {
"import": "./dist/link/index.mjs",
"types": "./link.d.ts",
"default": "./dist/link/index.js"
},
"./middleware": {
"import": "./dist/middleware/index.mjs",
"types": "./middleware.d.ts",
"default": "./dist/middleware/index.js"
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/next-intl/tsup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {defineConfig} from 'tsup';

export default defineConfig({
entry: ['src'],
format: ['esm', 'cjs'],
format: ['cjs'],
splitting: false,
sourcemap: true,
clean: true,
Expand Down
3 changes: 1 addition & 2 deletions packages/use-intl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
"build": "tsup",
"test": "TZ=Europe/Berlin vitest",
"lint": "eslint src test && tsc --noEmit",
"prepublishOnly": "turbo test && turbo lint && turbo build"
"prepublishOnly": "CI=true turbo test && turbo lint && turbo build"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"files": [
"dist",
Expand Down
2 changes: 1 addition & 1 deletion packages/use-intl/tsup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {defineConfig} from 'tsup';

const config = {
entry: ['src'],
format: ['esm', 'cjs'],
format: ['cjs'],
splitting: false,
sourcemap: true,
clean: true,
Expand Down

3 comments on commit 22d9f27

@vercel
Copy link

@vercel vercel bot commented on 22d9f27 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

example-next-13-next-auth – ./examples/example-next-13-next-auth

example-next-13-next-auth-git-main-next-intl.vercel.app
example-next-13-next-auth.vercel.app
example-next-13-next-auth-next-intl.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 22d9f27 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-example-next-13 – ./examples/example-next-13

next-intl-example-next-13-git-main-next-intl.vercel.app
next-intl-example-next-13.vercel.app
next-intl-example-next-13-next-intl.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 22d9f27 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-docs – ./docs

next-intl-docs.vercel.app
next-intl-docs-git-main-next-intl.vercel.app
next-intl-docs-next-intl.vercel.app

Please sign in to comment.