-
-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Custom drivers failed on build #2193
Conversation
β¦tatement] to a dynamic import()". Modify `setup()` in `src/module.ts` to await `getMountDriver()`. Modify `tsconfig.json` to avoid TS2705 error: "A dynamic import call in ES5/ES3 requires the Promise constructor. Make sure you have a declaration for the Promise constructor or include ES2015 in your --lib option."
β Deploy Preview for nuxt-content ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for the PR, |
Sorry for the delay. Yes, if creating a new fixture is simply creating a small demo application that is using a custom driver, I can do that. I will merge the latest updates with the PR branch and add the fixture. |
Reproduce: ``` pnpm install npm run build npm run dev:fixtures custom-driver ```
Created Uses a locally defined ( I know that 'github' is already a supported driver that does not require a custom definition, but this was the simplest test ) |
I'm re-reading your request:
Following the same pattern as the other fixtures, I created a |
I wrote a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks β€οΈ
π Linked issue
Issue #2096 (Custom drivers failed to build)
β Type of change
π Description
Resolves #2096 so that Nuxt Content builds with support for custom drivers:
getMountDriver()
insrc/utils.ts
to "change the require [statement] to a dynamic import()".setup()
insrc/module.ts
to awaitgetMountDriver()
.tsconfig.json
to avoid TS2705 error: "A dynamic import call in ES5/ES3 requires the Promise constructor. Make sure you have a declaration for the Promise constructor or include ES2015 in your --lib option."π Checklist