Skip to content

Commit

Permalink
fix: always enable publicAssets plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Apr 7, 2022
1 parent fefd2e9 commit a78e1be
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/rollup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,16 @@ export const getRollupConfig = (nitro: Nitro) => {
rollupConfig.plugins.push(serverAssets(nitro))

// Public assets
if (nitro.options.serveStatic) {
rollupConfig.plugins.push({
name: 'dirnames',
renderChunk (code, chunk) {
return {
code: (chunk.isEntry ? 'globalThis.entryURL = import.meta.url;' : '') + code,
map: null
}
rollupConfig.plugins.push({
name: 'dirnames',
renderChunk (code, chunk) {
return {
code: (chunk.isEntry ? 'globalThis.entryURL = import.meta.url;' : '') + code,
map: null
}
})
rollupConfig.plugins.push(publicAssets(nitro))
}
}
})
rollupConfig.plugins.push(publicAssets(nitro))

// Storage
rollupConfig.plugins.push(storage({
Expand Down

0 comments on commit a78e1be

Please sign in to comment.