Skip to content
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

Option currying for consistency with the official next plugins #20

Open
kachkaev opened this issue Nov 25, 2019 · 2 comments
Open

Option currying for consistency with the official next plugins #20

kachkaev opened this issue Nov 25, 2019 · 2 comments

Comments

@kachkaev
Copy link

kachkaev commented Nov 25, 2019

👋 @rohanray WDYT of changing the API of the plugin the following way?

 // next.config.js
 module.exports = require("next-compose-plugins")([
   require("@next/bundle-analyzer")({ enabled: true }),
   require("@zeit/next-source-maps")(),
-  [require("next-fonts"), { assetPrefix: 'https://example.com', enableSvg: true }],
+  require("next-fonts")({ prefix: 'https://example.com', enableSvg: true }),
])

This request is similar to martpie/next-transpile-modules#52

I'd like to avoid pollution of the config object with plugin-specific options like enableSvg and also customize prefix for fonts only.

const assetPrefix = nextConfig.assetPrefix || '';

 const assetPrefix = options.prefix !== undefined ? options.prefix : nextConfig.assetPrefix || ''; 
@kachkaev
Copy link
Author

kachkaev commented Feb 2, 2020

🏓 @rohanray 🙂

A issue request in next-transpile-modules has been successfully resolved: martpie/next-transpile-modules#52

@rohanray
Copy link
Owner

@kachkaev : I will have a look this weekend. Thanks -RR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants