Skip to content

Commit e6a5cfa

Browse files
committed
feat: Build with Rolldown
1 parent 2edffa5 commit e6a5cfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+434
-1678
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ yarn-error.log
99
.nxcache
1010
packages/**/yarn.lock
1111

12-
.DS_Store
12+
.DS_Store
13+
packages/bundler-plugin-core/src/version.ts

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
packages/e2e-tests/scenarios/*/ref/**/*
22
packages/bundler-plugin-core/test/fixtures
33
.nxcache
4+
# current prettier version doesn't support import assertions
5+
rollup.config.mjs

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"ts-node": "^10.9.2"
3737
},
3838
"volta": {
39-
"node": "18.20.8",
39+
"node": "22.22.0",
4040
"yarn": "1.22.22"
4141
}
4242
}

packages/babel-plugin-component-annotate/.babelrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/babel-plugin-component-annotate/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const jestPackageJson = require("jest/package.json");
44
module.exports = {
55
root: true,
66
extends: ["@sentry-internal/eslint-config/jest", "@sentry-internal/eslint-config/base"],
7-
ignorePatterns: [".eslintrc.js", "dist", "jest.config.js", "rollup.config.js"],
7+
ignorePatterns: [".eslintrc.js", "dist", "jest.config.js", "rollup.config.mjs"],
88
parserOptions: {
99
tsconfigRootDir: __dirname,
1010
project: ["./src/tsconfig.json", "./test/tsconfig.json"],

packages/babel-plugin-component-annotate/package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"scripts": {
3535
"build": "premove ./out && run-p build:rollup build:types",
3636
"build:watch": "run-p build:rollup:watch build:types:watch",
37-
"build:rollup": "rollup --config rollup.config.js",
38-
"build:rollup:watch": "rollup --config rollup.config.js --watch --no-watch.clearScreen",
37+
"build:rollup": "rolldown --config rollup.config.mjs",
38+
"build:rollup:watch": "rolldown --config rollup.config.mjs --watch --no-watch.clearScreen",
3939
"build:types": "tsc --project types.tsconfig.json",
4040
"build:types:watch": "tsc --project types.tsconfig.json --watch --preserveWatchOutput",
4141
"build:npm": "npm pack",
@@ -51,11 +51,7 @@
5151
},
5252
"devDependencies": {
5353
"@babel/core": "7.18.5",
54-
"@babel/preset-env": "7.18.2",
5554
"@babel/preset-react": "^7.23.3",
56-
"@babel/preset-typescript": "7.17.12",
57-
"@rollup/plugin-babel": "5.3.1",
58-
"@rollup/plugin-node-resolve": "13.3.0",
5955
"@sentry-internal/eslint-config": "4.9.1",
6056
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.9.1",
6157
"@swc/core": "^1.2.205",
@@ -66,7 +62,7 @@
6662
"eslint": "^8.18.0",
6763
"jest": "^28.1.1",
6864
"premove": "^4.0.0",
69-
"rollup": "2.75.7",
65+
"rolldown": "^1.0.0-rc.4",
7066
"ts-node": "^10.9.1",
7167
"typescript": "^4.7.4"
7268
},

packages/babel-plugin-component-annotate/rollup.config.js

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import packageJson from "./package.json" with { type: "json" };
2+
import modulePackage from "module";
3+
4+
export default {
5+
platform: "node",
6+
input: ["src/index.ts"],
7+
external: [...Object.keys(packageJson.dependencies ?? []), ...modulePackage.builtinModules],
8+
output: [
9+
{
10+
file: packageJson.module,
11+
format: "esm",
12+
exports: "named",
13+
sourcemap: true,
14+
},
15+
{
16+
file: packageJson.main,
17+
format: "cjs",
18+
exports: "named",
19+
sourcemap: true,
20+
},
21+
],
22+
};

packages/bundler-plugin-core/.babelrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/bundler-plugin-core/.eslintrc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
".eslintrc.js",
99
"dist",
1010
"jest.config.js",
11-
"rollup.config.js",
11+
"rollup.config.mjs",
1212
"test/fixtures/**/*",
1313
"sentry-release-injection-file.js",
1414
"sentry-esbuild-debugid-injection-file.js",
@@ -17,9 +17,6 @@ module.exports = {
1717
tsconfigRootDir: __dirname,
1818
project: ["./src/tsconfig.json", "./test/tsconfig.json"],
1919
},
20-
globals: {
21-
__PACKAGE_VERSION__: "readonly",
22-
},
2320
env: {
2421
node: true,
2522
},

0 commit comments

Comments
 (0)