Testing a minimal reproduction for another issue & uncovered:
Steps to reproduce:
- Install Nuxt
npm create nuxt@latest without adding any optional features.
- Install nuxt-directus-sdk
npm install nuxt-directus-sdk add it to modules in nuxt.config.ts
npm run dev
It looks like the installModule() was removed from module.ts in this commit. Current next branch code should have it re-added on the conditional - I think that's the source of the problem and is a simple fix.
|
// Register @nuxt/image with Directus provider |
|
const imageConfig = typeof options.image === 'boolean' ? { enabled: options.image } : options.image |
|
const imageEnabled = imageConfig?.enabled ?? true |
|
|
|
if (imageEnabled) { |
|
const { setDefaultProvider, modifiers } = imageConfig || {} |
|
|
|
const imageBaseUrl = devProxyEnabled |
|
? `${devProxyPath}/assets` |
|
: useUrl(clientUrl, 'assets') |
|
|
|
await registerModule('@nuxt/image', 'image', { |
|
// Set default provider if requested |
|
...(setDefaultProvider && { provider: 'directus' }), |
|
// Configure Directus provider |
|
directus: { |
|
baseURL: imageBaseUrl, |
|
modifiers, |
|
}, |
|
}) |
|
} |
Happy to fix but before I do, I want to make sure I'm not taking down Chesterton's Fence. Why was it switched?
Originally posted by @kheiner in #2
Originally posted by @kheiner in #2