Skip to content

Commit

Permalink
build: do not emit .mjs in runtime directory (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 19, 2024
1 parent 77163e4 commit 945882a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
19 changes: 13 additions & 6 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
entries: [
{
input: 'src/runtime/',
outDir: 'dist/runtime',
ext: 'js'
externals: [
'#build/types/layouts'
],
hooks: {
'build:prepare' (ctx) {
ctx.options.entries = ctx.options.entries?.filter(entry => !entry.input?.includes('src/runtime'))
ctx.options.entries.push({
builder: 'mkdist',
input: 'src/runtime/',
outDir: 'dist/runtime',
ext: 'js'
})
}
]
}
})
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,5 @@
"hooks": {
"after:bump": "npx changelogen@latest --no-commit --no-tag --output --r $(node -p \"require('./package.json').version\")"
}
},
"build": {
"externals": [
"#build/types/layouts"
]
}
}

0 comments on commit 945882a

Please sign in to comment.