Hey guys!
I'm having problems with experimental Assets.
During dev mode, everything is working, but when trying to build, I get the following error:
[vite]: Rollup failed to resolve import "virtual:image-service" from "[OMITTED]/node_modules/.pnpm/astro@2.6.1_@types+node@18.16.2_sharp@0.32.1/node_modules/astro/dist/assets/internal.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error [vite]: Rollup failed to resolve import "virtual:image-service" from "[OMITTED]/node_modules/.pnpm/astro@2.6.1_@types+node@18.16.2_sharp@0.32.1/node_modules/astro/dist/assets/internal.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
So, I'm using a custom entrypoint, which uses an external in-house service (with Thumbor), basically I just do URL mapping. The entrypoint sets the relative path to this file:
image: {
service: {
entrypoint: 'src/thumbor',
config: {},
},
},
experimental: {
assets: true,
},
Anyway, it's quite strange to be working 100% in development mode and only in build breaking.