Passing options to page component loader #28235
Unanswered
emanueleperuffo
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to create pages with the new i18n beta feature of netlify-cms, in single_file mode.
My page components are yaml files and a custom webpack loader transforms them to mdx.
In single_file mode, each one of my page component files would translate to multiple pages, one for each supported locale.
Webpack allows passing options to loaders with the syntax
require('module.js?key=value')
. How hard would it be to allow passing options to components this way? Now this is not possible because Gatsby checks if/path/to/page.yml?locale=en
exists in the filesystem.This would allow my webpack loader to do this:
Beta Was this translation helpful? Give feedback.
All reactions