next-plugins | Official Next.js plugins | Runtime Evironment library
kandi X-RAY | next-plugins Summary
kandi X-RAY | next-plugins Summary
This repository has been deprecated in favor of the Next.js monorepo:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of next-plugins
next-plugins Key Features
next-plugins Examples and Code Snippets
Community Discussions
Trending Discussions on next-plugins
QUESTION
I'm setting up a Next.js project with typescript. I've been following several guides but I seem to be facing an issue with import aliases.
I'm not sure if this is an issue with my configuration or with Next.js.
Here are a few pages referencing similar issues whose tips I followed without success:
- https://github.com/zeit/next-plugins/issues/535
- https://medium.com/anna-coding/how-to-use-absolute-module-import-path-in-next-js-dcbc806272e5
I tried messing around with Next.js' webpack configuration to solve the problem (adding resolve.alias options directly to next.config.js, but this didn't help and Next.js supposedly supports typescript out of the box now (resolve.extensions are well defined)
Next.js version 9.3.5
babel-plugin-module-resolver version 4.0.0
tsconfig.json
...ANSWER
Answered 2020-Apr-16 at 09:51After thinking on this some more I realized I was trying to do two things:
- Handle typescript aliases
- Use babel-plugin-inline-react-svg to import SVGS
The provided configuration actually works for regular typescript imports however this configuration doesn't allow svg imports to be aliased, I tried adding the extension to module-resolver with no luck.
After doing some more research I found an open issue being tackled at babel-plugin-inline-react-svg: https://github.com/airbnb/babel-plugin-inline-react-svg/pull/17
It seems this is a know compatibility issue between babel-plugin-module-resolver and babel-plugin-inline-react-svg.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install next-plugins
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page