Hi!
I'm building a custom Webpack-based Vue project in here using vue-loader, for an educational project I'm working on. But I'm having issues with this library. I've used it the same way I did with a React project of the same nature:
config.plugins = [
// ... other plugins here
{
test: /\.vue$/,
use: "vue-loader",
},
{
test: /\.md$/,
loader: "frontmatter-markdown-loader",
options: {
mode: [
mode.VUE_COMPONENT
],
vue: {
root: "markdown-content",
},
},
},
// ... other plugins here
];
config.plugins = [
new VueLoaderPlugin(),
];
But I've had this issue, importing a Markdown file:
ERROR in ./src/views/Main.vue
Module build failed (from ./node_modules/frontmatter-markdown-loader/index.js):
Error: Failed to import vue-template-compiler or/and @vue/component-compiler-utils:
If you intend to use 'vue-component', `vue-render-functions` mode, install both to your project:
https://hmsk.github.io/frontmatter-markdown-loader/vue.html
at Object.module.exports (F:\Git\GitHub\vue-webpack-base\node_modules\frontmatter-markdown-loader\index.js:73:13)
@ ./src/index.js 2:0-34 6:22-26
I've also tried using the loader like this, for MD files, to no success:
config.plugins = [
// ... other plugins here
{
test: /\.md$/,
use: [
"vue-loader",
{
loader: "frontmatter-markdown-loader",
options: {
mode: [
mode.VUE_COMPONENT
],
vue: {
root: "markdown-content",
},
},
},
],
},
// ... other plugins here
];
I'm currently using Vue @ 3.1.4, with @vue/compiler-sfc (^3.1.4) and @vue/component-compiler-utils (^3.2.2), and I tried installing vue-template-compiler, but I'm stuck with this error.
I'm wondering if I'm doing something wrong, or loading it the wrong way, or if I should explicitly declare vue-loader to use @vue/compiler-sfc.
Hi!
I'm building a custom Webpack-based Vue project in here using
vue-loader, for an educational project I'm working on. But I'm having issues with this library. I've used it the same way I did with a React project of the same nature:But I've had this issue, importing a Markdown file:
I've also tried using the loader like this, for MD files, to no success:
I'm currently using Vue @
3.1.4, with@vue/compiler-sfc(^3.1.4) and@vue/component-compiler-utils(^3.2.2), and I tried installingvue-template-compiler, but I'm stuck with this error.I'm wondering if I'm doing something wrong, or loading it the wrong way, or if I should explicitly declare
vue-loaderto use@vue/compiler-sfc.