File Output and Mapper Function #30
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Describe the solution you'd like
It would be cool if you could include a mapping function as a part of the config file.
So that, when the request is completed, the data is passed through the function before being output to the file.
I would also like to be able to utilise fs-extra's outputFile function, as I am outputting to a .scss file.
Describe alternatives you've considered
I have modified the module.js in my local install with a hard-coded mapper function to do what I need to.
I may look at implementation also and submit a PR depending on where you are at with the project.
Additional context
I am using the module to pull some data from a CMS API (sanity) and pass some colors and other variables as Global SCSS variables that in then injected throughout the Nuxt app. I haven't considered performance of these changes, as I am generating for static.
The text was updated successfully, but these errors were encountered: