|
1 | 1 | import { defineConfig } from "rollup"; |
2 | 2 | import { sentryRollupPlugin } from "@sentry/rollup-plugin"; |
3 | | -import { join, posix } from "path"; |
| 3 | +import { join } from "path"; |
| 4 | +import { existsSync } from "fs"; |
4 | 5 |
|
5 | 6 | const __dirname = new URL(".", import.meta.url).pathname; |
6 | 7 |
|
7 | 8 | console.log({ |
8 | 9 | __dirname, |
9 | | - posixInput: posix.join(__dirname, "bundle.js"), |
10 | | - input: join(__dirname, "..", "bundle.js"), |
| 10 | + input: join(__dirname, "bundle.js"), |
| 11 | + existsInput: existsSync(join(__dirname, "bundle.js")), |
11 | 12 | outputPath: join(__dirname, "..", "..", "out", "rollup4"), |
12 | | - posixOutputPath: posix.join(__dirname, "..", "..", "out", "rollup4"), |
13 | 13 | }); |
14 | 14 |
|
15 | 15 | export default defineConfig({ |
16 | | - input: { index: posix.join(__dirname, "bundle.js") }, |
| 16 | + input: { index: join(__dirname, "bundle.js") }, |
17 | 17 | output: { |
18 | | - dir: posix.join(__dirname, "..", "..", "out", "rollup4"), |
| 18 | + dir: join(__dirname, "..", "..", "out", "rollup4"), |
19 | 19 | sourcemap: true, |
20 | 20 | sourcemapDebugIds: true, |
21 | 21 | }, |
|
0 commit comments