Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not allow to process .md files as of v16.5.0 when chaining with markdown loader #1883

Closed
fengyuanchen opened this issue Oct 1, 2021 · 2 comments

Comments

@fengyuanchen
Copy link

Version

16.8.1

Reproduction link

github.com

Steps to reproduce

  1. git clone https://github.com/fengyuanchen/markdown-to-vue-loader
  2. cd markdown-to-vue-loader
  3. npm update
  4. npm start

The related webpack.config.js:

module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /\.md$/,
        use: [
          'vue-loader',
          'markdown-to-vue-loader',
        ],
      },
    ],
  },
};

What is expected?

The vue-loader should process the source (valid SFC) from the markdown-to-vue-loader.

What is actually happening?

Throw Error:

ERROR in ./src/examples/vue.md 1:0
Module parse failed: Unexpected token (1:0)
File was processed with these loaders:
 * ./node_modules/vue-loader/dist/index.js
 * ./index.js
You may need an additional loader to handle the result of these loaders.
> <template><div class="component-vue"><h1>Vue code blocks</h1>
| <blockquote>
| <p>Vue code block will be loaded as a Vue component by default.</p>

@JuniorTour
Copy link
Contributor

Seems to be related to #1879.

PR #1889 may fix this issue too.

@sodatea
Copy link
Member

sodatea commented Oct 26, 2021

Fixed in v16.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants