Open kachkaev opened 4 years ago
👋 @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 https://github.com/martpie/next-transpile-modules/issues/52
I'd like to avoid pollution of the config object with plugin-specific options like enableSvg and also customize prefix for fonts only.
enableSvg
prefix
https://github.com/rohanray/next-fonts/blob/cf7165ceb6d9288abee47e5f0bb0db6a9625ade1/index.js#L12
↓
const assetPrefix = options.prefix !== undefined ? options.prefix : nextConfig.assetPrefix || '';
🏓 @rohanray 🙂
A issue request in next-transpile-modules has been successfully resolved: https://github.com/martpie/next-transpile-modules/issues/52
next-transpile-modules
@kachkaev : I will have a look this weekend. Thanks -RR
👋 @rohanray WDYT of changing the API of the plugin the following way?
This request is similar to https://github.com/martpie/next-transpile-modules/issues/52
I'd like to avoid pollution of the config object with plugin-specific options like
enableSvg
and also customizeprefix
for fonts only.https://github.com/rohanray/next-fonts/blob/cf7165ceb6d9288abee47e5f0bb0db6a9625ade1/index.js#L12
↓