Import markdown file in script tag to display help
See original GitHub issueI’m trying to read the content of a markdown file (.md) stored in statics or assets folder of my quasar project and I have updated the quasar.conf.js file with the following change to support raw file loading after adding raw-loader to my project
extendWebpack(cfg) {
cfg.module.rules.push({
test: /\.md$/i,
use: "raw-loader"
});
I’m trying to load the markdown, using import command from one of the .vue component script tag as below
import md from "~statics/help.md";
But when I run the project, it compiles to 100% and throws the below error
• Compiling:
└── SPA ████████████████████ 100% done in ~13s
ERROR Failed to compile with 1 errors 8:22:43 AM
This dependency was not found:
* ~statics/help.md in ./node_modules/babel-loader/lib??ref--1-0!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/Help.vue?vue&type=script&lang=js&
To install it, you can run: npm install --save ~statics/help.md
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Add script tag to markdown file [closed] - Stack Overflow
Save this answer. Show activity on this post. You have two options: You could include raw HTML <script> tags in your Markdown, or...
Read more >Getting Started | Markdown Guide
You can add Markdown formatting elements to a plaintext file using a text editor application. Or you can use one of the many...
Read more >Handbook Markdown Guide - GitLab
This method works for YouTube videos and any other embed video within an <iframe> tag. Copy the code below and paste it into...
Read more >16.1 Source external R scripts | R Markdown Cookbook
Note that we used include = FALSE in the above example because we only want to execute the script without showing any output....
Read more >How To Use Python-Markdown to Convert Markdown Text to ...
In this tutorial, you will install the Python-Markdown library, use it to convert Markdown strings to HTML, convert Markdown files to HTML files...
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
If u’ve seen “use” instead of “loader” then it’s a mistake in Webpack’s docs. Meaning: we’re not using “our own Webpack” but the official one 😃
@joyalkj Alternatively, in quasar.conf.js add an alias for a markdown folder:
Then you can do: