Fix new violations from eslint-plugin-unicorn update.

This commit is contained in:
David Anson 2022-08-16 04:01:53 +00:00
parent c6d0ce5596
commit 4c00ffa2f0
14 changed files with 64 additions and 56 deletions

View file

@ -3,6 +3,7 @@
"use strict";
const webpack = require("webpack");
const nodeModulePrefixRe = /^node:/u;
function config(options) {
const { entry, filename, mode, packageJson } = options;
@ -37,6 +38,13 @@ function config(options) {
"path": __dirname
},
"plugins": [
new webpack.NormalModuleReplacementPlugin(
nodeModulePrefixRe,
(resource) => {
const module = resource.request.replace(nodeModulePrefixRe, "");
resource.request = module;
}
),
new webpack.BannerPlugin({
"banner": `${name} ${version} ${homepage} @license ${license}`
})