{"id":29150369,"url":"https://github.com/ken1987/vue-markdown-es6-loader","last_synced_at":"2026-05-04T10:34:31.194Z","repository":{"id":57141194,"uuid":"83674191","full_name":"ken1987/vue-markdown-es6-loader","owner":"ken1987","description":"Converting Markdown to Vue single-file component loader for Webpack.","archived":false,"fork":false,"pushed_at":"2017-03-09T02:43:32.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-30T18:03:07.956Z","etag":null,"topics":["markdown","vue","vue-loader","webpack","webpack-loader"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ken1987.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-02T12:15:49.000Z","updated_at":"2017-03-03T04:44:56.000Z","dependencies_parsed_at":"2022-09-03T13:01:04.940Z","dependency_job_id":null,"html_url":"https://github.com/ken1987/vue-markdown-es6-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ken1987/vue-markdown-es6-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ken1987%2Fvue-markdown-es6-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ken1987%2Fvue-markdown-es6-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ken1987%2Fvue-markdown-es6-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ken1987%2Fvue-markdown-es6-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ken1987","download_url":"https://codeload.github.com/ken1987/vue-markdown-es6-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ken1987%2Fvue-markdown-es6-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262864258,"owners_count":23376461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markdown","vue","vue-loader","webpack","webpack-loader"],"created_at":"2025-06-30T23:10:24.685Z","updated_at":"2026-05-04T10:34:26.168Z","avatar_url":"https://github.com/ken1987.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-markdown-es6-loader\n\nConverting Markdown to Vue single-file component loader for Webpack.\n\n## notes\n\n* node \u003e= 6.0.0\n* npm \u003e= 3.0.0\n* webpack \u003e= 2.0.0\n* output es6 module\n\n## install\n\n``` shell\nnpm i vue-markdown-es6-loader\n```\n\n## webpack 2.x config\n\n```js\n{\n  module: {\n    rules: [{\n      test: /\\.vue\\.md$/,\n      use: [{\n        loader: 'vue-loader',\n        options: {\n           js: 'babel-loader' // output es6 module\n        }\n      }, {\n        loader: 'vue-markdown-es6-loader',\n        options: {\n          prefix: '\u003cdiv\u003e',\n          postfix: '\u003c/div\u003e',\n          highlightStyle: 'default'\n        }\n      }]\n    }]\n  }\n}\n```\n\n## options\n\n### prefix\n\n  * Type: string\n  * Default: `\u003cdiv\u003e`\n  * Details:\n\n    Element tag of output start.\n\n    \u003e Vue warn: Component template should contain exactly one root element\n\n\n### postfix\n\n  * Type: string\n  * Default: `\u003c/div\u003e`\n  * Details:\n\n    Element tag of output end.\n\n    \u003e Vue warn: Component template should contain exactly one root element\n\n### highlightStyle\n\n  * Type: string\n  * Default: `default`\n  * Optional: refer to [style filename][2]\n  * Details:\n\n    [`highlight.js`][1] style.\n\n* markedOptions\n\n  * Type: string\n  * Optional: refer to [marked options][3]\n  * Details:\n\n    A markdown parser options.\n\n\n## usage\n\n*  use `.vue` in markdown\n\n  * set code type to  `vue`\n  * write path into code area\n\n\u003e  \\`\\`\\` vue\n\u003e\n\u003e  ./code.vue\n\u003e\n\u003e \\`\\`\\`\n\n* reslute\n\n``` html\n\u003ctemplate\u003e\n    \u003cdiv\u003e\n        \u003cvmd14884628711531\u003e\u003c/vmd14884628711531\u003e\n        \u003cpre\u003e\u003ccode class=\"hljs default\"\u003e...\u003c/code\u003e\u003c/pre\u003e\n    \u003c/div\u003e\n\u003c/template\u003e\n\u003cscript\u003e\n    import vmd14884628711531 from './code.vue';\n    export default {\n      components:{\n        vmd14884628711531\n      }\n    };\n    import 'highlight.js/styles/default.css'\n\u003c/script\u003e\n```\n\n## TODO\n\n* Verify `prefix` and `postfix` are closed\n* asynchronous read file\n\n[1]: https://github.com/isagalaev/highlight.js\n[2]: https://github.com/isagalaev/highlight.js/tree/master/src/styles\n[3]: https://github.com/chjj/marked\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fken1987%2Fvue-markdown-es6-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fken1987%2Fvue-markdown-es6-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fken1987%2Fvue-markdown-es6-loader/lists"}