Support strict dependency install for image integration (#5034)
This commit is contained in:
parent
19a76882c4
commit
2d9d422167
4 changed files with 10 additions and 6 deletions
5
.changeset/small-laws-dream.md
Normal file
5
.changeset/small-laws-dream.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/image': patch
|
||||
---
|
||||
|
||||
Support strict dependency install
|
|
@ -45,6 +45,7 @@
|
|||
"@altano/tiny-async-pool": "^1.0.2",
|
||||
"http-cache-semantics": "^4.1.0",
|
||||
"image-size": "^1.0.2",
|
||||
"kleur": "^4.1.5",
|
||||
"magic-string": "^0.25.9",
|
||||
"mime": "^3.0.0",
|
||||
"slash": "^4.0.0"
|
||||
|
@ -57,7 +58,6 @@
|
|||
"astro-scripts": "workspace:*",
|
||||
"chai": "^4.3.6",
|
||||
"cheerio": "^1.0.0-rc.11",
|
||||
"kleur": "^4.1.4",
|
||||
"mocha": "^9.2.2",
|
||||
"rollup-plugin-copy": "^3.4.0",
|
||||
"sharp": "^0.31.0",
|
||||
|
|
|
@ -49,9 +49,6 @@ export default function integration(options: IntegrationOptions = {}): AstroInte
|
|||
function getViteConfiguration() {
|
||||
return {
|
||||
plugins: [createPlugin(_config, resolvedOptions)],
|
||||
optimizeDeps: {
|
||||
include: ['image-size'].filter(Boolean),
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
external: ['sharp'],
|
||||
|
@ -59,6 +56,8 @@ export default function integration(options: IntegrationOptions = {}): AstroInte
|
|||
},
|
||||
ssr: {
|
||||
noExternal: ['@astrojs/image', resolvedOptions.serviceEntryPoint],
|
||||
// CJS dependencies used by `serviceEntryPoint`
|
||||
external: ['http-cache-semantics', 'image-size', 'mime'],
|
||||
},
|
||||
assetsInclude: ['**/*.wasm'],
|
||||
};
|
||||
|
|
|
@ -2540,7 +2540,7 @@ importers:
|
|||
cheerio: ^1.0.0-rc.11
|
||||
http-cache-semantics: ^4.1.0
|
||||
image-size: ^1.0.2
|
||||
kleur: ^4.1.4
|
||||
kleur: ^4.1.5
|
||||
magic-string: ^0.25.9
|
||||
mime: ^3.0.0
|
||||
mocha: ^9.2.2
|
||||
|
@ -2553,6 +2553,7 @@ importers:
|
|||
'@altano/tiny-async-pool': 1.0.2
|
||||
http-cache-semantics: 4.1.0
|
||||
image-size: 1.0.2
|
||||
kleur: 4.1.5
|
||||
magic-string: 0.25.9
|
||||
mime: 3.0.0
|
||||
slash: 4.0.0
|
||||
|
@ -2564,7 +2565,6 @@ importers:
|
|||
astro-scripts: link:../../../scripts
|
||||
chai: 4.3.6
|
||||
cheerio: 1.0.0-rc.12
|
||||
kleur: 4.1.5
|
||||
mocha: 9.2.2
|
||||
rollup-plugin-copy: 3.4.0
|
||||
sharp: 0.31.1
|
||||
|
|
Loading…
Reference in a new issue