webpack: Sourcemap from bundle is not utf-8 encoded

This can be seen in sourcemap

image

This is the actual bundle generated

image

The letter å is wrong. Not sure if it’s Webpack’s fault or Sourcemap’s?

Using Linux if that matters. Using devtool: '#source-map'

This is a letter only used in comments, not actual source, so shouldn’t be a real problem.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 3
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Also running into this. Doesn’t seem to be any pattern, i have files either encoded as utf-8 or us-ascii.

0.e6063d8a791459c43093.chunk.js.map:                 text/plain; charset=us-ascii
1.e6063d8a791459c43093.chunk.js.map:                 text/plain; charset=utf-8
10.e6063d8a791459c43093.chunk.js.map:                text/plain; charset=utf-8
11.e6063d8a791459c43093.chunk.js.map:                text/plain; charset=utf-8
12.e6063d8a791459c43093.chunk.js.map:                text/plain; charset=utf-8
13.e6063d8a791459c43093.chunk.js.map:                text/plain; charset=utf-8
14.e6063d8a791459c43093.chunk.js.map:                text/plain; charset=utf-8
15.e6063d8a791459c43093.chunk.js.map:                text/plain; charset=utf-8
16.e6063d8a791459c43093.chunk.js.map:                text/plain; charset=us-ascii

In fact, this is not limited to source maps. My bundles are also scattered, some utf-8, some us-ascii. I’d like them to all be utf-8 encoded. Can this be forced? I tried webpack-encoding-plugin but it didn’t work.

Using webpack 3.2