next-seo icon indicating copy to clipboard operation
next-seo copied to clipboard

Change import path to relative

Open saenyakorn opened this issue 2 years ago • 1 comments

Description of Change(s):

Absolute path works well when we develop in VSCode (or other editor) since we set baseUrl in tsconfig.json.

But, after bundling with microbundle. It does not change absolute path to relative that cause Typescript cannot infer type as shown in the picture below.

Screenshot 2566-09-20 at 11 21 57 Screenshot 2566-09-20 at 11 23 45

microbundle has an option to resolve path alias call --alias. I tried it so hard, but it did not work. So, I decided to fix this issue with the minimum effort by changing all absolute paths into relative paths


To help get PR's merged faster, the following is required:

[] Updated the documentation [] Unit/Cypress test covering all cases

Please link to relevant Google Docs or schema.org docs for what you are adding so we can review.

Please have a read of the Contributing Guide for full details.

https://github.com/garmeeh/next-seo/blob/master/CONTRIBUTING.md

saenyakorn avatar Sep 20 '23 09:09 saenyakorn

Hey @saenyakorn thanks for the PR. I fixed a conflict through GitHub UI and it messed up the yarn lockfile 😓 Would you mind fixing locally and pushing.

Also there were a few new components added since you carried out this work so might be a few more files needing to be updated to relative if you wouldn't mind? 🙏

I will get this merged and released ASAP then!

garmeeh avatar Oct 28 '23 15:10 garmeeh