Skip to content

Commit 090d66d

Browse files
committed
break: change default output exts to .js and .d.ts due to rolldown switch to esm-only
1 parent 11bf915 commit 090d66d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/bin/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function logEntryStats(stats: BuildEntryStats): void {
3131
const outputLength = output.length + 2
3232

3333
cl(
34-
'▸',
34+
dim('+'),
3535
format.padEnd(5),
3636
output.padEnd(outputLength),
3737
dim(`[${formatBytes(stats.size)}, ${formatMs(stats.buildTime)}]`),

src/bin/loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function loadConfig(
3030
tsconfig: defaults.tsconfig,
3131
output: { format: 'esm' },
3232
})
33-
const tempConfig = resolve(cwd, 'node_modules/.hypernym/bundler/config.mjs')
33+
const tempConfig = resolve(cwd, 'node_modules/.hypernym/bundler/config.js')
3434
await write(tempConfig, result.output[0].code)
3535

3636
const config: Options = (await import(tempConfig)).default

src/types/entries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export interface EntryChunk extends EntryBase {
120120
* ```ts
121121
* export default defineConfig({
122122
* entries: [
123-
* { input: './src/index.ts' }, // outputs './dist/index.mjs'
123+
* { input: './src/index.ts' }, // outputs './dist/index.js'
124124
* ]
125125
* })
126126
* ```
@@ -200,7 +200,7 @@ export interface EntryDts extends EntryBase {
200200
* ```ts
201201
* export default defineConfig({
202202
* entries: [
203-
* { dts: './src/types.ts' }, // outputs './dist/types.d.mts'
203+
* { dts: './src/types.ts' }, // outputs './dist/types.d.ts'
204204
* ]
205205
* })
206206
* ```

src/types/options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export interface Options {
1313
* ```ts
1414
* export default defineConfig({
1515
* entries: [
16-
* { input: './src/index.ts' }, // outputs './dist/index.mjs'
17-
* { dts: './src/types.ts' }, // outputs './dist/types.d.mts'
16+
* { input: './src/index.ts' }, // outputs './dist/index.js'
17+
* { dts: './src/types.ts' }, // outputs './dist/types.d.ts'
1818
* // ...
1919
* ]
2020
* })

src/utils/get-output-path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function getOutputPath(
1616
let newExt = ''
1717

1818
if (esm.includes(ext)) {
19-
newExt = extension === 'dts' ? '.d.mts' : '.mjs'
19+
newExt = extension === 'dts' ? '.d.ts' : '.js'
2020
} else if (legacy.includes(ext)) {
2121
newExt = extension === 'dts' ? '.d.cts' : '.cjs'
2222
}

0 commit comments

Comments
 (0)