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

What is the best practice for file name / structure? #2741

Closed
MariuzM opened this issue Mar 7, 2019 · 4 comments
Closed

What is the best practice for file name / structure? #2741

MariuzM opened this issue Mar 7, 2019 · 4 comments

Comments

@MariuzM
Copy link

MariuzM commented Mar 7, 2019

When using ParcelJS and running npm run prod, it does not account for images being in different directory and thus when loading the page images are not loaded.

So i have background image placed in CSS (src folder)
background-image: url(../img/cover.png);

After Parcel it moves all the files to one main folder but it does not change the cover.png destination.
background-image: url(../cover.ff2eb614.png);

For me to fix i would need to remove .
background-image: url(./cover.ff2eb614.png);

So I'm wandering is there a best practice for these things? So currently my workflow is build and copy all files to my VPS via sFTP

@mischnic
Copy link
Member

mischnic commented Mar 7, 2019

background-image: url(../cover.ff2eb614.png);

This likely related to a recent bug: #2740

@MariuzM
Copy link
Author

MariuzM commented Mar 7, 2019

And here i thought i was doing something wrong :D

@mischnic
Copy link
Member

Could you please upgrade to version 1.12.1 or later and try it again? Should be fixed

@MariuzM
Copy link
Author

MariuzM commented Mar 14, 2019

Hm still having issues. but maybe not the same as before. I'm using AnimeJS but i'm getting Uncaught ReferenceError: anime is not defined

In the src file it's just linked in HTML not installed via NPM

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

No branches or pull requests

2 participants