Skip to content

Commit

Permalink
Netlify: Try fixing build error
Browse files Browse the repository at this point in the history
```
Rollup failed to resolve import "fsevents" from "/opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js".
```
  • Loading branch information
tordans committed Sep 6, 2024
1 parent d1a4178 commit 775c2d6
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,22 @@ export default defineConfig({
exclude: [
'route-snapper',
// Needed for `watchAndRun` https://stackoverflow.com/a/75655669
'fsevents',
ASTRO_USE_NETLIFY_ADAPTER === 'true' ? undefined : 'fsevents',
],
},
plugins: [
// See keystatic/scripts/README.md
watchAndRun([
{
name: 'extract-project-keys',
watchKind: ['change'],
watch: path.resolve('src/content/projects/index.json'),
run: 'npm run extract-project-keys',
delay: 300,
},
]),
ASTRO_USE_NETLIFY_ADAPTER === 'true'
? undefined
: watchAndRun([
{
name: 'extract-project-keys',
watchKind: ['change'],
watch: path.resolve('src/content/projects/index.json'),
run: 'npm run extract-project-keys',
delay: 300,
},
]),
],
},
})

0 comments on commit 775c2d6

Please sign in to comment.