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.

Doesn't put image in dist folder

See original GitHub issue

Describe the bug When you build your application, the images don’t go to dist folder.

To Reproduce Steps to reproduce the behavior:

  1. put a logo.png image inside of popup folder
  2. alter App.vue :
<template>
  <div class="container">
    <p>Hello, World!</p>
    <img src="logo.png">
  </div>
</template>
  1. run $ npm run watch:dev or $ npm run-script-build
  2. check dist folder without logo.png

Expected behavior creating a logo.png inside of dist folder.

Desktop (please complete the following information):

  • vue-web-extension version: v1.12.0
  • OS: Linux Ubuntu 18.04
  • Node.js version: v12.16.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
edualbcommented, Apr 17, 2020

We need to open a PR to fix it. Unfortunately, I am not having time to do it, when I will have time, I open a PR if it has not solved yet.

If anyone wants to solve it, the solution is here 😃

1reaction
MihaiVoineacommented, Apr 16, 2020

I had a similar problem with fonts.

The way I fixed it was to change emitFile for file-loader to true:

      {
        test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
        loader: "file-loader",
        options: {
          name: "[name].[ext]",
          outputPath: "/fonts/",
          emitFile: true // changed this from false
        }
      }

Maybe a similar fix for images will do the trick for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack doesn't place images in dist folder - Stack Overflow
As a result I want webpack either place this image in dist/img/ or processed and replaced this path with it's base64 format.
Read more >
Why is it copying my assets to dist folder? · Issue #97 - GitHub
My code is compiling and working, but the file loader module is copying my assets into dist and then not even using them....
Read more >
Output Management - webpack
Webpack will generate the files and put them in the /dist folder for you, but it doesn't keep track of which files are...
Read more >
Need Help, no images in dist folder : r/reactjs - Reddit
It sounds like you are expecting the bundler to know what paths are inside a JSON file in your project. The bundler usually...
Read more >
Images not loading from assets folder in Angular
Angular resolves this problem for you, and in a component, you have to only add a path to the assets folder, instead of...
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