Bootstrap-vue: Using with Nuxt causes errors with CSS sourcemaps

Created on 22 Mar 2018  路  3Comments  路  Source: bootstrap-vue/bootstrap-vue

I wasn't sure where to open this issue, but I thought that here was probably the best place.

I'm using Bootstrap-Vue (thank you for creating it, awesome stuff!) with Nuxt and I'm encountering some behaviour which I don't really know how to resolve. When I load a page of the app such as /club/my-club, there are multiple requests sent because Chrome attempts to load a CSS source map from a relative location. Here is the Nuxt log:

  nuxt:render Rendering url /users/finnian +17ms
  nuxt:render Data fetching /users/finnian: 70ms +0ms
  nuxt:render Rendering url /users/bootstrap.css.map +808ms <-- oops!

This causes the entire page to break, because it's loaded in the same context (probably wrong terminology), and Nuxt throws a server error because it attempts to call an external API with boostrap.css.map as a user ID.

See my comment on nuxt/nuxt.js#2710 for some more info.

My knowledge of webpack is very basic and therefore I'm not entirely sure how to fix this. If anyone has any suggestions I'd be very grateful!

Most helpful comment

While we wait we can disable source maps:
cssSourceMap: false
In the build section of nuxt.config.js

All 3 comments

This is a duplicate of #2710

Yeah it is, I wasn't sure where to open. Will close in favour of the nuxt one seeing as that's where the problem resides.

While we wait we can disable source maps:
cssSourceMap: false
In the build section of nuxt.config.js

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alvirtuoso picture alvirtuoso  路  3Comments

KonradDeskiewicz picture KonradDeskiewicz  路  3Comments

ebertti picture ebertti  路  3Comments

MikeJWms picture MikeJWms  路  3Comments

DavidRueter picture DavidRueter  路  3Comments