noi-techpark / webcomp-activity-poi

GNU Affero General Public License v3.0
0 stars 3 forks source link

testing does not load css #6

Closed davidebz closed 3 years ago

davidebz commented 3 years ago

Hi @Piiit , using the new local development it's look like that css resources are copied to dist and webcomponent is working correctly.

Can you understand why in testing this css resources got an 404? I attach screenshot.

Are all the css file copied on the server and in the right place?

404

Piiit commented 3 years ago

Hi @davidebz, yes all assets are uploaded. It seems that your component uses the wrong paths here... the CDN for all files has a different URL, nothing is located directly on the store itself.

The correct URL should be: https://cdn.webcomponents.opendatahub.testingmachine.eu/dist/0e5fbede-4a21-4dd3-bf85-7d2be71dfb12/v1.0.0/search.css

So as base path URL all your assets should take your main entrypoints javascript file as reference and do the relative path resolution from there.

davidebz commented 3 years ago

We have a file in which paths can be configured (see image). But I thinks we could not put hard coded values. Or? You mean we should dynamically detect the absolute url of url bundle.js and "absolutized" al relative paths to this?

path

davidebz commented 3 years ago

I have made a PR whic use document.currentScript, let's see if this fix

Piiit commented 3 years ago

This part works, no 404 errors anymore...