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'm trying to use custom aliases in imported mdx-files, which doesn't seem to work.
Example: I have an mdx file that imports another mdx file, which also imports another mdx file, and I want to replace parts of the path to the imported file or a component inside that file with an alias. Aliases used in the initial mdx file work as expected, but the same alias doesn't work when it is used in an mdx file the initial file includes.
Docusaurus says: Module not found: Error: Can't resolve '@os.compos/os.features.js' in 'C:\Users(...)
Is this something that should work and I need to do something extra in imported files, or was it just missed when developing this plugin? :)
The text was updated successfully, but these errors were encountered:
👋 under the hood the plugin uses webpack aliases which works by replacing imports with the configured path. Anything valid with webpack aliases is also valid here.
@os.compos needs to map to a specific valid directory:
But even when using the latter alias it results in a "module not found" error ("Module not found: Error: Can't resolve '@os.comp/os.features.js' in 'C:\Users...).
This is my import line: import EditButtonR from '@os.comp/os.features.js'
Which sits in a 'partial' _document that is also imported.
Both aliases work in md/mdx files that are not partials!
I'm using the latest version of Docusaurus (2.0.0-beta.13). Are there any logs I could check to figure out what Docusaurus does with those aliases in partials?
Hi,
I'm trying to use custom aliases in imported mdx-files, which doesn't seem to work.
Example: I have an mdx file that imports another mdx file, which also imports another mdx file, and I want to replace parts of the path to the imported file or a component inside that file with an alias. Aliases used in the initial mdx file work as expected, but the same alias doesn't work when it is used in an mdx file the initial file includes.
Docusaurus says: Module not found: Error: Can't resolve '@os.compos/os.features.js' in 'C:\Users(...)
Is this something that should work and I need to do something extra in imported files, or was it just missed when developing this plugin? :)
The text was updated successfully, but these errors were encountered: