
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
encoding-plugin
Advanced tools
Take control over the encoding of emitted webpack assets. This can be useful, if the delivering webserver enforces a specific content-type, so that your js-code is not interpreted as utf-8 by the browser.
Install package
npm install encoding-plugin
Setup webpack config
const EncodingPlugin = require('encoding-plugin');
module.exports = {
plugins: [
new EncodingPlugin({
encoding: 'iso-8859-1',
}),
],
};
Additional options:
test
, include
, exclude
RegExp or array of RegExps to filter processed files
(default test
is /(\.js|\.css)($|\?)/i
)
The Plugin uses iconv-lite to handle the encoding. A list of supported encodings can be found here
To use non-utf-8 encoding with webpack-dev-server, you must set the appropriate charset like so:
devServer: {
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/javascript; charset=windows-1251'
}
// ...
}
FAQs
Control Webpack output encoding
The npm package encoding-plugin receives a total of 265 weekly downloads. As such, encoding-plugin popularity was classified as not popular.
We found that encoding-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.