Default export from next-routes
See original GitHub issueHi !
I’m trying to get next-routes working with TypeScript.
I have this code right now :
import Routes from 'next-routes';
const routes = new Routes();
routes
.add('about')
.add('post', '/p/:id')
export default routes;
But when I’m trying to compile I get this error :
const routes = new Routes(); ^ TypeError: next_routes_1.default is not a constructor
I followed example here
Could you please help me ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
next-routes - npm
Start using next-routes in your project by running `npm i next-routes`. ... export default class Blog extends React.
Read more >Dynamic routing with next export mode - Stack Overflow
Js; Alternative library (I've looked at next-routes but that hasn't ... return { props: {}, }; } export default function FooPage(): JSX.
Read more >Next-routes NPM - npm.io
export default class Blog extends React.Component { static async getInitialProps ({query}) { // query.slug } render () { // this.props.url.query.slug } } ...
Read more >next-routes/README.md - UNPKG
48, ```javascript ; 49, export default class Blog extends React.Component { ; 50, static async getInitialProps ({query}) { ; 51, // query.slug ;...
Read more >Advanced Features: Static HTML Export - Next.js
Features that require a Node.js server, or dynamic logic that cannot be computed during the build process, are not supported: Image Optimization (default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same here. I “solved” it with:
@fridays I believe there’s a pending PR to fix this. Can we get it merged please?