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.

Need support for code splitting

See original GitHub issue

Hi!

Currently I’m trying to code split my vue component with this way:

// App.vue

<style scoped src="./template/style.scss" lang="scss"></style>
<template src="./template/index.html"></template>
<script src="./script/index.js" type="text/javascript"></script>

And it seems that the vue-jest doesn’t render the template. When I mount the component and check the vm.$el.innerHTML it’s empty.

I see the comment in the docs: https://vue-test-utils.vuejs.org/en/guides/testing-SFCs-with-jest.html

Note: vue-jest currently does not support all the features of vue-loader, for example custom block support and style loading. In addition, some webpack-specific features such as code-splitting are not supported either. 

So is the problem I faced is regarding the code splitting not supported yet?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:16
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
andrey-mordasovcommented, Nov 27, 2017

Vote for this. I’m experiencing the same issue.

1reaction
LinusBorgcommented, Jun 6, 2018

@eddyerburgh this can be closed, I think. Not to be solved in vue-jest

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code-Splitting - React
Code -splitting your app can help you “lazy-load” just the things that are currently needed by the user, which can dramatically improve the...
Read more >
Code Splitting - webpack
Browser support is different. An example of this can be having a Component which always depends on a big library that should be...
Read more >
Improving JavaScript Bundle Performance With Code-Splitting
With code-splitting, our goal is to defer the loading, parsing, and execution of JavaScript code which is not needed for the current page...
Read more >
Reduce JavaScript payloads with code splitting - web.dev
Split the JavaScript bundle to only send the code needed for the initial route when the user loads an application. This minimizes the...
Read more >
What is Code Splitting? - How Next.js Works
Code -splitting is the process of splitting the application's bundle into smaller chunks required by ... Next.js has built-in support for code splitting....
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