Can't load image in PIXI.js when using Parcel bundler

Today I've tried to play with PIXI.js with Parcel bundler. Even if it's a convenient way to build and serve HTML file with your application, it does not resolve assets paths correctly.

The problem I've encountered was missing references to assets after serving HTML with Parcel. Static files were not copied into /dist directory - thus served index.html wasn't aware of it.

The easiest solution I've found was to use Parcel plugin parcel-plugin-static-files-copy which copied all /static directory content into /dist and it was actually everything I needed (in that case) to resolve paths properly.

Source code for this article: with a problem and with a solution