You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
I expected to have my .json file returned.
Current Behavior
Instead, I was asked for 'module' or 'render' objects.
Steps to Reproduce (for bugs)
Create a JSON file to import
use dynamic(require) to import the file
voila
Context
I'd like to use the dynamic import in a page-loading situation whereby my .md/json is loaded in on the prop-injection. Better than working with fetch as the export function is respected by next and the require baked-in.
The text was updated successfully, but these errors were encountered:
You are able to do await import('path/to/file.json'), the next/dynamic module is for rendering dynamic React component but you don't need it to use async imports.
Expected Behavior
I expected to have my .json file returned.
Current Behavior
Instead, I was asked for 'module' or 'render' objects.
Steps to Reproduce (for bugs)
Context
I'd like to use the dynamic import in a page-loading situation whereby my .md/json is loaded in on the prop-injection. Better than working with fetch as the export function is respected by next and the require baked-in.
The text was updated successfully, but these errors were encountered: