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

images #53

Open
pierroberto opened this issue Nov 11, 2018 · 5 comments
Open

images #53

pierroberto opened this issue Nov 11, 2018 · 5 comments

Comments

@pierroberto
Copy link

If I add images in the img folder, webpack adds only few of them in the build folder when I run either npm start or NODE_ENV=production npm run build.

In the console I get:

[12:25:20] [write-file-webpack-plugin] stats.compilation.errors.length is "0".
[12:25:20] [write-file-webpack-plugin] asset: ./img.png; destination: ./build/img.png [written] (4 KB)
[12:25:20] [write-file-webpack-plugin] asset: ./icon-128.png; destination: ./build/icon-128.png [written] (10.04 KB)
[12:25:20] [write-file-webpack-plugin] asset: ./icon-34.png; destination: ./build/icon-34.png [written] (2.07 KB)

Other images have some extension png. I do not understand the reason.
Any idea?

Thank you

@samuelsimoes
Copy link
Owner

Can you create a small example to how reproduce it? I tried some combinations here and anything works apparently correctly.

@jekozyra
Copy link

It looks to me as if the images are only getting added if they're declared as icons.

@jekozyra
Copy link

@samuelsimoes actually it seems that other things are not syncing as well. For example, if you add css to content scripts, the css also does not end up in the build.

@jekozyra
Copy link

@pierroberto I played around with this a bit, and it seems that if the files are mentioned in imports (example), then they are automatically included.

@rayronvictor
Copy link

@pierroberto I played around with this a bit, and it seems that if the files are mentioned in imports (example), then they are automatically included.

You need to import them in background.js

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

4 participants