diff options
-rw-r--r-- | rollup.config.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rollup.config.js b/rollup.config.js index d04eb4e..1f46f2a 100644 --- a/rollup.config.js +++ b/rollup.config.js | |||
@@ -5,6 +5,7 @@ import { existsSync } from 'fs'; | |||
5 | import { join } from 'path'; | 5 | import { join } from 'path'; |
6 | 6 | ||
7 | const production = !process.env.ROLLUP_WATCH; | 7 | const production = !process.env.ROLLUP_WATCH; |
8 | |||
8 | const general = { | 9 | const general = { |
9 | output: [ | 10 | output: [ |
10 | { | 11 | { |
@@ -20,6 +21,18 @@ const general = { | |||
20 | context: "window", | 21 | context: "window", |
21 | plugins: [ | 22 | plugins: [ |
22 | { | 23 | { |
24 | name: 'watch-mapclay', | ||
25 | buildStart() { | ||
26 | const mapclayPath = join(process.cwd(), 'mapclay', 'dist', 'mapclay.mjs'); | ||
27 | console.log('Watching:', mapclayPath); | ||
28 | if (existsSync(mapclayPath)) { | ||
29 | this.addWatchFile(mapclayPath); | ||
30 | } else { | ||
31 | console.log('mapclay.mjs not found at:', mapclayPath); | ||
32 | } | ||
33 | } | ||
34 | }, | ||
35 | { | ||
23 | name: 'leader-line', | 36 | name: 'leader-line', |
24 | transform(code, id) { | 37 | transform(code, id) { |
25 | if (id.includes('node_modules/leader-line/')) { | 38 | if (id.includes('node_modules/leader-line/')) { |