-
-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(platform): exclude @analogjs/content from being eagerly bundled
- Loading branch information
1 parent
33d729f
commit c8202ab
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Plugin } from 'vite'; | ||
|
||
/** | ||
* This excludes the build from including the | ||
* @analogjs/content package because it is | ||
* dynamically imported at runtime. | ||
* | ||
* This prevents a dependency on @analogjs/router | ||
* to @analogjs/content | ||
* | ||
* @returns | ||
*/ | ||
export function contentPlugin(): Plugin[] { | ||
return [ | ||
{ | ||
name: 'analogjs-content-plugin', | ||
config() { | ||
return { | ||
build: { | ||
rollupOptions: { | ||
external: ['@analogjs/content'], | ||
}, | ||
}, | ||
}; | ||
}, | ||
}, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters