File tree Expand file tree Collapse file tree 4 files changed +33
-21
lines changed Expand file tree Collapse file tree 4 files changed +33
-21
lines changed Original file line number Diff line number Diff line change @@ -229,8 +229,8 @@ public function getFiles(): array
229
229
],
230
230
[
231
231
'scope ' => 'default ' ,
232
- 'destination ' => 'tsup.config.js ' ,
233
- 'template ' => 'node/tsup.config.js .twig ' ,
232
+ 'destination ' => 'tsup.config.ts ' ,
233
+ 'template ' => 'node/tsup.config.ts .twig ' ,
234
234
],
235
235
[
236
236
'scope ' => 'default ' ,
Original file line number Diff line number Diff line change 31
31
}
32
32
}
33
33
},
34
+ "files": [
35
+ "dist"
36
+ ],
34
37
"module": "dist/index.mjs",
35
38
"types": "dist/index.d.ts",
36
39
"repository": {
40
43
"devDependencies": {
41
44
"@types/node": "20.11.25",
42
45
"tsup": "7.2.0",
46
+ "esbuild-plugin-file-path-extensions": "^2.0.0",
43
47
"tslib": "2.6.2",
44
48
"typescript": "5.4.2"
45
49
},
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { defineConfig, type Options } from "tsup";
2
+ import { esbuildPluginFilePathExtensions } from "esbuild-plugin-file-path-extensions";
3
+
4
+ const commonConfig: Options = {
5
+ sourcemap: true,
6
+ clean: true,
7
+ dts: true,
8
+ treeshake: true,
9
+ target: "node16",
10
+ entry: ["src/**/*.ts"],
11
+ outDir: "dist",
12
+ };
13
+
14
+ export default defineConfig([
15
+ {
16
+ ...commonConfig,
17
+ format: "esm",
18
+ esbuildPlugins: [esbuildPluginFilePathExtensions({ filter: /^\./ })],
19
+ bundle: true,
20
+ // Yes, bundle: true => https://github.com/favware/esbuild-plugin-file-path-extensions?tab=readme-ov-file#usage
21
+ },
22
+ {
23
+ ...commonConfig,
24
+ format: "cjs",
25
+ bundle: false,
26
+ },
27
+ ]);
You can’t perform that action at this time.
0 commit comments