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
It has been great to have assetPrefix in our app. With few modifications we are able to serve nextjs next to a meteor app, served in the same domain but with a specific prefix:
mydomain.com/next/* --> nextjs
mydomain.com/* --> old meteor
The problem
In the scenario described above, we make use of assetPrefix not only for assets but for the whole application. As consequence:
It feels hacky to call it assetPrefix when we are actually prefixing everything.
As it was intended, the helpers from next/asset are only useful for proper assets. Anything outside of /static that needs to be prefixed can't be done this way.
The assetPrefix is not accessible from next/config. If you want to reuse assetPrefix e.g. when prefixing your routes, you can't.
Desired behaviour
↳ Option 1 (quick and dirty):
give access to assetPrefix, allowing devs to keep misusing it as a global prefix.
It has been great to have
assetPrefix
in our app. With few modifications we are able to serve nextjs next to a meteor app, served in the same domain but with a specific prefix:The problem
In the scenario described above, we make use of
assetPrefix
not only for assets but for the whole application. As consequence:assetPrefix
when we are actually prefixing everything.next/asset
are only useful for proper assets. Anything outside of/static
that needs to be prefixed can't be done this way.assetPrefix
is not accessible fromnext/config
. If you want to reuseassetPrefix
e.g. when prefixing your routes, you can't.Desired behaviour
↳ Option 1 (quick and dirty):
give access to
assetPrefix
, allowing devs to keep misusing it as a global prefix.↳ Option 2:
create a new prefix to cover the use case I described.
assetPrefix
would still exist, butglobalPrefix
would be its default value.The text was updated successfully, but these errors were encountered: