-
Notifications
You must be signed in to change notification settings - Fork 91
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
Can't import directly from absolute static
path.
#62
Comments
It's not an issue of this library after all. It's a webpack/babel configuration. See: vercel/next.js#946 (comment) |
Hey @dydokamil. Yes, this is not directly related to this plugin but as it is based on webpack, you can configure webpack to understand absolute paths. I also do it in my project for such things, even for global components (here is a nice example: https://github.com/zeit/next.js/tree/master/examples/with-absolute-imports, the related config can be seen in I'll close the issue as it is more related to webpack in general, but feel free to reopen it if you are experiencing problems with the implementation. I'm happy to help :) |
In my app I pass routes to image files to have them displayed in many different components. How can I get
next-optimized-routes
to work with absolute routes? The documentation mentions only a relative import:./images/img.jpg
.This is an import that works fine with regular next.js:
next-optimized-images route that also works:
next-optomized-images that doesn't work but should:
Error message:
The text was updated successfully, but these errors were encountered: