Skip to content

Commit e344e53

Browse files
committed
rename dist->cjs in NextJS
1 parent 270e969 commit e344e53

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

packages/nextjs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"engines": {
1010
"node": ">=8"
1111
},
12-
"main": "build/dist/index.server.js",
12+
"main": "build/cjs/index.server.js",
1313
"module": "build/esm/index.server.js",
1414
"browser": "build/esm/index.client.js",
1515
"types": "build/types/index.server.d.ts",
@@ -57,7 +57,7 @@
5757
"build:types:watch": "tsc -p tsconfig.types.json --watch",
5858
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
5959
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular --exclude 'config/types\\.ts' src/index.server.ts # see https://github.com/pahen/madge/issues/306",
60-
"clean": "rimraf dist esm build coverage *.js *.js.map *.d.ts",
60+
"clean": "rimraf build coverage *.js *.js.map *.d.ts",
6161
"fix": "run-s fix:eslint fix:prettier",
6262
"fix:eslint": "eslint . --format stylish --fix",
6363
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
@@ -97,7 +97,7 @@
9797
}
9898
},
9999
"sideEffects": [
100-
"./dist/index.server.js",
100+
"./cjs/index.server.js",
101101
"./esm/index.server.js",
102102
"./src/index.server.ts"
103103
]

packages/nextjs/test/integration/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference types="next" />
2+
/// <reference types="next/types/global" />
23
/// <reference types="next/image-types/global" />
34

45
// NOTE: This file should not be edited

packages/nextjs/tsconfig.cjs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
"compilerOptions": {
55
"module": "commonjs",
6-
"outDir": "build/dist"
6+
"outDir": "build/cjs"
77
}
88
}

packages/nextjs/vercel/install-sentry-from-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ yarn --prod false
2828
echo " "
2929
echo "BUILDING SDK"
3030
# We need to build es5 versions because `next.config.js` calls `require` on the SDK (to get `withSentryConfig`) and
31-
# therefore it looks for `dist/index.js`
31+
# therefore it looks for `cjs/index.js`
3232
yarn build:cjs
3333
# We need to build esm versions because that's what `next` actually uses when it builds the app
3434
yarn build:esm

0 commit comments

Comments
 (0)