@pob/rollup-esbuild 6.4.1 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +6 -6
- package/lib/createRollupConfig.js +23 -8
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.5.0](https://github.com/christophehurpeau/pob/compare/@pob/rollup-esbuild@6.4.2...@pob/rollup-esbuild@6.5.0) (2025-04-27)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* better rollup configuration for generatedCode using preset ([d03e893](https://github.com/christophehurpeau/pob/commit/d03e893afca3fabc107e2bf8739a054e06359a09))
|
|
11
|
+
* **deps:** update dependency rollup to v4.40.0 ([#2419](https://github.com/christophehurpeau/pob/issues/2419)) ([03f789e](https://github.com/christophehurpeau/pob/commit/03f789ea8007bc8ffa162b18cf829d3f275e7d54))
|
|
12
|
+
|
|
13
|
+
Version bump for dependency: @pob/rollup
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [6.4.2](https://github.com/christophehurpeau/pob/compare/@pob/rollup-esbuild@6.4.1...@pob/rollup-esbuild@6.4.2) (2025-04-27)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **deps:** update dependency esbuild to v0.25.3 ([#2494](https://github.com/christophehurpeau/pob/issues/2494)) ([acef82a](https://github.com/christophehurpeau/pob/commit/acef82a34d9f1b93517fd216f1c41e82ff9e30d6))
|
|
21
|
+
|
|
22
|
+
Version bump for dependency: @pob/rollup
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [6.4.1](https://github.com/christophehurpeau/pob/compare/@pob/rollup-esbuild@6.4.0...@pob/rollup-esbuild@6.4.1) (2025-04-27)
|
|
7
26
|
|
|
8
27
|
Note: no notable changes
|
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<
|
|
1
|
+
<h1 align="center">
|
|
2
2
|
@pob/rollup-esbuild
|
|
3
|
-
</
|
|
3
|
+
</h1>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
rollup configuration with typescript for pob
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/npm/v/@pob/rollup-esbuild.svg?style=flat-square"></a>
|
|
11
|
-
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/npm/dw/@pob/rollup-esbuild.svg?style=flat-square"></a>
|
|
12
|
-
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/node/v/@pob/rollup-esbuild.svg?style=flat-square"></a>
|
|
13
|
-
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/npm/types/@pob/rollup-esbuild.svg?style=flat-square"></a>
|
|
10
|
+
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/npm/v/@pob/rollup-esbuild.svg?style=flat-square" alt="npm version"></a>
|
|
11
|
+
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/npm/dw/@pob/rollup-esbuild.svg?style=flat-square" alt="npm downloads"></a>
|
|
12
|
+
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/node/v/@pob/rollup-esbuild.svg?style=flat-square" alt="node version"></a>
|
|
13
|
+
<a href="https://npmjs.org/package/@pob/rollup-esbuild"><img src="https://img.shields.io/npm/types/@pob/rollup-esbuild.svg?style=flat-square" alt="types"></a>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
## Install
|
|
@@ -34,7 +34,6 @@ export default function createRollupConfig({
|
|
|
34
34
|
[".ts", jsx && ".tsx", ".json"],
|
|
35
35
|
env,
|
|
36
36
|
).filter(Boolean);
|
|
37
|
-
const preferConst = true;
|
|
38
37
|
|
|
39
38
|
return {
|
|
40
39
|
input: entryPath,
|
|
@@ -55,12 +54,24 @@ export default function createRollupConfig({
|
|
|
55
54
|
format,
|
|
56
55
|
sourcemap: true,
|
|
57
56
|
exports: "named",
|
|
58
|
-
generatedCode: {
|
|
59
|
-
constBindings: preferConst,
|
|
60
|
-
},
|
|
57
|
+
generatedCode: { preset: "es2015" },
|
|
61
58
|
externalLiveBindings: false,
|
|
62
59
|
freeze: false,
|
|
63
60
|
})),
|
|
61
|
+
onwarn(warning, warn) {
|
|
62
|
+
// throw on certain warnings
|
|
63
|
+
if (
|
|
64
|
+
warning.code === "NON_EXISTENT_EXPORT" ||
|
|
65
|
+
warning.code === "UNUSED_EXTERNAL_IMPORT" ||
|
|
66
|
+
warning.code === "UNRESOLVED_IMPORT"
|
|
67
|
+
) {
|
|
68
|
+
throw new Error(warning.message);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Use default for everything else
|
|
72
|
+
warn(warning);
|
|
73
|
+
},
|
|
74
|
+
|
|
64
75
|
external: externalByPackageJson,
|
|
65
76
|
plugins: [
|
|
66
77
|
esbuild({
|
|
@@ -89,15 +100,19 @@ export default function createRollupConfig({
|
|
|
89
100
|
moduleDirectories: ["src"], // don't resolve node_modules, but allow src (see baseUrl in tsconfig)
|
|
90
101
|
},
|
|
91
102
|
}),
|
|
92
|
-
...(
|
|
93
|
-
|
|
103
|
+
...(() => {
|
|
104
|
+
if (env.target === "browser") {
|
|
105
|
+
return [
|
|
94
106
|
replace({
|
|
95
107
|
preventAssignment: true,
|
|
96
108
|
delimiters: ['"', '"'],
|
|
97
109
|
"react-native": '"react-native-web"',
|
|
98
110
|
}),
|
|
99
|
-
]
|
|
100
|
-
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return [];
|
|
115
|
+
})(),
|
|
101
116
|
|
|
102
117
|
...(typeof plugins === "function" ? plugins(env) : plugins),
|
|
103
118
|
].filter(Boolean),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/rollup-esbuild",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "rollup configuration with typescript for pob",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"homepage": "https://github.com/christophehurpeau/pob",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=20.
|
|
16
|
+
"node": ">=20.11.0"
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"bin": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"pob": {},
|
|
46
46
|
"prettier": "@pob/root/prettier-config",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"rollup": "4.
|
|
48
|
+
"rollup": "4.40.0",
|
|
49
49
|
"typescript": "^4.0.3 || ^5.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@pob/rollup": "6.
|
|
57
|
+
"@pob/rollup": "6.2.0",
|
|
58
58
|
"@rollup/plugin-node-resolve": "16.0.1",
|
|
59
59
|
"@rollup/plugin-replace": "6.0.2",
|
|
60
60
|
"@rollup/plugin-run": "3.1.0",
|
|
61
|
-
"esbuild": "0.25.
|
|
62
|
-
"rollup": "4.
|
|
61
|
+
"esbuild": "0.25.3",
|
|
62
|
+
"rollup": "4.40.0",
|
|
63
63
|
"rollup-config-external-dependencies": "^3.0.1",
|
|
64
64
|
"rollup-plugin-esbuild": "6.2.1"
|
|
65
65
|
}
|