Skip to content

Commit

Permalink
Use writeBundle hook in Rollup copy plugins
Browse files Browse the repository at this point in the history
So that they work even if dist/ doesn't exist yet.
  • Loading branch information
marijnh committed Sep 21, 2023
1 parent 2ffb70f commit bde8b2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion acorn-loose/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import buble from "@rollup/plugin-buble"
import {promises as fs} from "node:fs"

const copy = (from, to) => ({
async buildEnd() { await fs.writeFile(to, await fs.readFile(from)) }
async writeBundle() { await fs.writeFile(to, await fs.readFile(from)) }
})

export default {
Expand Down
2 changes: 1 addition & 1 deletion acorn-walk/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import buble from "@rollup/plugin-buble"
import {promises as fs} from "node:fs"

const copy = (from, to) => ({
async buildEnd() { await fs.writeFile(to, await fs.readFile(from)) }
async writeBundle() { await fs.writeFile(to, await fs.readFile(from)) }
})

export default {
Expand Down
2 changes: 1 addition & 1 deletion acorn/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import buble from "@rollup/plugin-buble"
import {promises as fs} from "node:fs"

const copy = (from, to) => ({
async buildEnd() { await fs.writeFile(to, await fs.readFile(from)) }
async writeBundle() { await fs.writeFile(to, await fs.readFile(from)) }
})

export default [
Expand Down

0 comments on commit bde8b2d

Please sign in to comment.