Problem loading primeflex.css.map

PrimeFlex is a lightweight responsive CSS utility library to accompany Prime UI libraries and static webpages
Post Reply
tech
Posts: 2
Joined: 08 Jan 2021, 11:09

01 Feb 2021, 14:56

I have included Primeflex in my main.ts like this:

import 'primeflex/primeflex.css';

Primeflex is working as it should, but Chrome DevTools is unable to locate the primeflex.css.map. Probably because it gets confused by my url, which is using vue-router. I get this warning in the console:

DevTools failed to load SourceMap: Could not load content for http://localhost:3000/admin/primeflex.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

The "/admin" part of the url is inserted by vue-router.

Any ideas on how to get around this problem?

colinbes
Posts: 17
Joined: 26 May 2021, 23:50

26 May 2021, 23:58

Any word on this. I have tried importing the css.map file in main.ts but then get error

Code: Select all

Failed to load module script: The server responded with a non-JavaScript MIME type of "application/json". Strict MIME type checking is enforced for module scripts per HTML spec.

pangbuddy
Posts: 13
Joined: 01 Apr 2011, 23:27

02 Aug 2021, 09:31

The same problem, primeflex works well, but the warning message displayed on the console is annoying.

Code: Select all

DevTools failed to load source map: Could not load content for http://127.0.0.1:8080/demo/javax.faces.resource/primeflex/primeflex.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
Primefaces 10.0

Method 1:

Code: Select all

<h:outputStylesheet name="css/primeflex.min.css" />

Method 2:
pom.xml

Code: Select all

        <dependency>
            <groupId>org.webjars.bowergithub.primefaces</groupId>
            <artifactId>primeflex</artifactId>
            <version>2.0.0</version>
        </dependency>
Html header

Code: Select all

<h:outputStylesheet library="webjars" name="primeflex/primeflex.min.css" />

Vsevolod Golovanov
Posts: 10
Joined: 12 May 2014, 16:09

27 Jun 2023, 19:58

Instead of specifying library=webjars include like this:

Code: Select all

<h:outputStylesheet name="webjars/primeflex/3.0.1/primeflex.min.css" />
Then the browser would be able to construct the right path to the source map.

But if you use postfix servlet mapping like *.xhtml, you'd still need something like OmniFaces' UnmappedResourceHandler, because the source map request won't have ".xhtml" at the end.

(I know this is old, but in case someone else stumbles upon it.)

Post Reply

Return to “PrimeFlex”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests