question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<route-meta> loader

See original GitHub issue

Hi,

i really love your plugin for vue cli. There’s one thing i’ve noticed when using <route-meta> custom block.

When using this custom block, it logically does not have loader registered for it so it throws error such as:

Module parse failed: Unexpected token
You may need an appropriate loader to handle this file type.

I came up with a dirty workaround, basically passing the <route-meta> to a custom loader that does not do anything, like this:

# vue.config.js
module.exports = {
  chainWebpack: config => {
    config.module
      .rule('routeMeta')
      .resourceQuery(/blockType=route-meta/)
      .type('javascript/auto')
      .use('routeMeta')
      .loader('routemeta.js');
  }
}

Did i miss something in the installation? Is there a cleaner way to handle this?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mjones2620commented, Jul 22, 2019

I have vue-loader 15.7.1 and I still get this error. I also tried above and still got the error.

1reaction
ktsncommented, Feb 19, 2019

This should be fixed in vue-loader v15.6.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Route Meta Fields | Vue Router
Route Meta Fields # ... So how do we access this meta field? First, each route object in the routes configuration is called...
Read more >
meta - Remix
parentsData is a hashmap of all the data exported by loader functions of current route and all of its parents. export const meta: ......
Read more >
API Reference | React Location - TanStack
The Router component is the root Provider component for the React Location instance and your route configuration in your app. Render it only...
Read more >
Where should route meta data be loaded in a Vue app?
I have something similar. I tackle this using the following approach: I use the same component for all /industry/:id Vue likes to reuse ......
Read more >
Route meta Based Page Layout - Vue - The Road to Enterprise
Learn how to manage layouts using route meta property. ... but if we have many complex layout components, we might want to consider...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found