Fixed Split.js issues when resizing to around 1000px wide

This commit is contained in:
n1474335 2022-05-30 22:53:17 +01:00
parent ff99436ce6
commit 668eac1f9e
6 changed files with 81 additions and 9 deletions

View file

@ -1,6 +1,7 @@
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { ModifySourcePlugin } = require("modify-source-webpack-plugin");
const path = require("path");
/**
@ -82,6 +83,16 @@ module.exports = {
to: "assets/forge/"
}
]
}),
new ModifySourcePlugin({
rules: [
{
// Fix toSpare(0) bug in Split.js by avoiding gutter accomodation
test: /split\.es\.js$/,
modify: (src, path) =>
src.replace("if (pixelSize < elementMinSize)", "if (false)")
}
]
})
],
resolve: {