Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

HikaruTakakura/markdown-loader-sample

Repository files navigation

markdown-sample

必要なパッケージのインストール

npm install --save-dev html-loader markdown-loader

vue.config.js

module.exports = {
  configureWebpack: {
    module: {
      rules: [
        {
          test: /\.md$/,
          use: [
            {
              loader: "html-loader"
            },
            {
              loader: "markdown-loader",
              options: {
                /* your options here */
              }
            }
          ]
        }
      ]
    }
  }
};

〇〇.js

@/assets/markdowns/sample.md にマークダウンが配置されているとして...

<template>
  <div>
    <div v-html="sampleMd"></div>
  </div>
</template>

<script>
import sampleMd from "@/assets/markdowns/sample.md";

export default {
  created() {
    this.sampleMd = sampleMd;
  }
};
</script>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published