@pob/rollup-esbuild 6.0.0 → 6.2.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 +15 -0
- package/lib/createRollupConfig.js +16 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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.2.0](https://github.com/christophehurpeau/pob/compare/@pob/rollup-esbuild@6.1.0...@pob/rollup-esbuild@6.2.0) (2025-02-02)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **rollup-esbuild:** supports .web extensions by default and replace react-native to react-native-web ([9e1b7f8](https://github.com/christophehurpeau/pob/commit/9e1b7f8566e5dbb1d898e2798d96e9bfd0cdf43c))
|
|
11
|
+
|
|
12
|
+
## [6.1.0](https://github.com/christophehurpeau/pob/compare/@pob/rollup-esbuild@6.0.0...@pob/rollup-esbuild@6.1.0) (2025-02-02)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* update rollup ([91f49c7](https://github.com/christophehurpeau/pob/commit/91f49c7e80138d26b27715edf71709ce7132eff7))
|
|
17
|
+
|
|
18
|
+
Version bump for dependency: @pob/rollup
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
## 6.0.0 (2025-02-01)
|
|
7
22
|
|
|
8
23
|
### ⚠ BREAKING CHANGES
|
|
@@ -2,6 +2,7 @@ import { readFileSync } from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { nodeFormatToExt, resolveEntry } from "@pob/rollup";
|
|
4
4
|
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
|
5
|
+
import replace from "@rollup/plugin-replace";
|
|
5
6
|
import configExternalDependencies from "rollup-config-external-dependencies";
|
|
6
7
|
import esbuild from "rollup-plugin-esbuild";
|
|
7
8
|
|
|
@@ -10,7 +11,12 @@ export default function createRollupConfig({
|
|
|
10
11
|
outDirectory = "dist",
|
|
11
12
|
pkg = JSON.parse(readFileSync(path.join(cwd, "package.json"))),
|
|
12
13
|
plugins = [],
|
|
13
|
-
getExtensions = (
|
|
14
|
+
getExtensions = (extensions, { target }) => {
|
|
15
|
+
if (target === "browser") {
|
|
16
|
+
return extensions.flatMap((ext) => [`.web${ext}`, `${ext}`]);
|
|
17
|
+
}
|
|
18
|
+
return extensions;
|
|
19
|
+
},
|
|
14
20
|
}) {
|
|
15
21
|
const pobConfig = pkg.pob;
|
|
16
22
|
|
|
@@ -83,6 +89,15 @@ export default function createRollupConfig({
|
|
|
83
89
|
moduleDirectories: ["src"], // don't resolve node_modules, but allow src (see baseUrl in tsconfig)
|
|
84
90
|
},
|
|
85
91
|
}),
|
|
92
|
+
...(env.target === "browser"
|
|
93
|
+
? [
|
|
94
|
+
replace({
|
|
95
|
+
preventAssignment: true,
|
|
96
|
+
delimiters: ['"', '"'],
|
|
97
|
+
"react-native": '"react-native-web"',
|
|
98
|
+
}),
|
|
99
|
+
]
|
|
100
|
+
: []),
|
|
86
101
|
|
|
87
102
|
...(typeof plugins === "function" ? plugins(env) : plugins),
|
|
88
103
|
].filter(Boolean),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/rollup-esbuild",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.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)",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"pob": {},
|
|
46
46
|
"prettier": "@pob/root/prettier-config",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"rollup": "4.
|
|
48
|
+
"rollup": "4.33.0",
|
|
49
49
|
"typescript": "^4.0.3 || ^5.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
@@ -54,12 +54,13 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@pob/rollup": "6.
|
|
57
|
+
"@pob/rollup": "6.1.0",
|
|
58
58
|
"@rollup/plugin-node-resolve": "16.0.0",
|
|
59
|
+
"@rollup/plugin-replace": "6.0.2",
|
|
59
60
|
"@rollup/plugin-run": "3.1.0",
|
|
60
61
|
"esbuild": "0.24.2",
|
|
61
|
-
"rollup": "4.
|
|
62
|
-
"rollup-config-external-dependencies": "^3.0.
|
|
62
|
+
"rollup": "4.33.0",
|
|
63
|
+
"rollup-config-external-dependencies": "^3.0.1",
|
|
63
64
|
"rollup-plugin-esbuild": "6.1.1"
|
|
64
65
|
}
|
|
65
66
|
}
|