Gridsome: Mailto links in gridsome/vue-remark fail to compile

Created on 9 Oct 2019  路  3Comments  路  Source: gridsome/gridsome

Description

Email links In markdown files that are processed with @gridsome/vue-remark cause build failures because I think Gridsome thinks they are relative links?

Steps to reproduce

Using a <[email protected]> or [mailto](mailto:[email protected]) in markdown files causes !!assets-loader errors and the site fails to compile. Here is a demo repo

Expected result

Mailto/email links created

Actual result

ERROR  Failed to compile with 2 errors                                                                                                                                       10:24:00 PM

These dependencies were not found:

* !!assets-loader?to=mailto%3Aemail2%40example2.com&target=_blank&rel=nofollow%20noopener%20noreferrer!mailto:[email protected] in ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/gridsome","cacheIdentifier":"7ca0bfbb-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??ref--17-0!./node_modules/@gridsome/vue-remark/lib/loader.js??ref--17-1!./docs/test.md?vue&type=template&id=2a569395&
* !!assets-loader?to=mailto%3Aemail%40example.com&target=_blank&rel=nofollow%20noopener%20noreferrer!mailto:[email protected] in ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/gridsome","cacheIdentifier":"7ca0bfbb-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??ref--17-0!./node_modules/@gridsome/vue-remark/lib/loader.js??ref--17-1!./docs/test.md?vue&type=template&id=2a569395&

To install them, you can run: npm install --save !!assets-loader?to=mailto%3Aemail2%40example2.com&target=_blank&rel=nofollow%20noopener%20noreferrer!mailto:[email protected] !!assets-loader?to=mailto%3Aemail%40example.com&target=_blank&rel=nofollow%20noopener%20noreferrer!mailto:[email protected]

Environment


Libs:
- gridsome version: 0.3.0
- @gridsome/cli version: 0.7.7

Browser:
- [ X ] Chrome (desktop) version 77

For Tooling issues:
- Node version: 10.15.1  
- Platform:  Windows
bug

Most helpful comment

Yes, the vue-remark plugin somehow transforms it into a g-link component. I'll fix it.

All 3 comments

Looks to me like its relatedto vue-remark.

When using the transformer-remark directly this works fine for me.

Yes, the vue-remark plugin somehow transforms it into a g-link component. I'll fix it.

I tested this and it works as expected with Gridsome 0.7.9

Was this page helpful?
0 / 5 - 0 ratings

Related issues

martifenosa picture martifenosa  路  3Comments

upandfine picture upandfine  路  3Comments

kaceo picture kaceo  路  3Comments

nolfranklin picture nolfranklin  路  3Comments

igregson picture igregson  路  3Comments