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?
Problem loading primeflex.css.map
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.
The same problem, primeflex works well, but the warning message displayed on the console is annoying.
Primefaces 10.0
Method 1:
Method 2:
pom.xml
Html header
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
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>
Code: Select all
<h:outputStylesheet library="webjars" name="primeflex/primeflex.min.css" />
-
- Posts: 10
- Joined: 12 May 2014, 16:09
Instead of specifying library=webjars include like this:
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.)
Code: Select all
<h:outputStylesheet name="webjars/primeflex/3.0.1/primeflex.min.css" />
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.)
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests