Update build settings

This commit is contained in:
Andras Schmelczer 2022-09-21 21:56:44 +02:00
parent a2436cbe80
commit 2dc9c45642
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
2 changed files with 6 additions and 13 deletions

View file

@ -55,7 +55,7 @@ module.exports = (env, argv) => ({
],
},
{
test: /\.(pdf)$/i,
test: /\.pdf$/i,
use: {
loader: 'file-loader',
options: {
@ -69,7 +69,7 @@ module.exports = (env, argv) => ({
use: 'svg-inline-loader',
},
{
test: /no-change.*$/i,
test: /no-change/i,
use: {
loader: 'file-loader',
options: {
@ -97,26 +97,19 @@ module.exports = (env, argv) => ({
use: [
'ts-loader',
{
// for removing whitespace from template strings
// for removing whitespace (mainly from template strings) which are not part of comments
loader: 'string-replace-loader',
options: {
search: /`\s+`/gs,
search: /(?<!\/\/[^\n]*)\s+/gs,
replace: ' ',
},
},
{
loader: 'string-replace-loader',
options: {
search: /`>\s+<`/gs,
replace: '><',
},
},
],
},
],
},
resolve: {
extensions: ['.ts', '.js'],
extensions: ['.ts'],
},
output: {
clean: true,