|
@@ -1,5 +1,4 @@
|
|
|
const path = require("path");
|
|
|
-const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
|
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
|
|
|
.BundleAnalyzerPlugin;
|
|
@@ -7,8 +6,7 @@ const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
|
|
|
module.exports = {
|
|
|
mode: "production",
|
|
|
entry: {
|
|
|
- "excalidraw.min": "./index.tsx",
|
|
|
- "fonts.min": "../../../public/fonts.css",
|
|
|
+ "excalidraw.min": "./entry.js",
|
|
|
},
|
|
|
output: {
|
|
|
path: path.resolve(__dirname, "dist"),
|
|
@@ -26,11 +24,7 @@ module.exports = {
|
|
|
{
|
|
|
test: /\.(sa|sc|c)ss$/,
|
|
|
exclude: /node_modules/,
|
|
|
- use: [
|
|
|
- MiniCssExtractPlugin.loader,
|
|
|
- { loader: "css-loader" },
|
|
|
- "sass-loader",
|
|
|
- ],
|
|
|
+ use: ["style-loader", { loader: "css-loader" }, "sass-loader"],
|
|
|
},
|
|
|
{
|
|
|
test: /\.(ts|tsx|js|jsx|mjs)$/,
|
|
@@ -94,7 +88,6 @@ module.exports = {
|
|
|
},
|
|
|
},
|
|
|
plugins: [
|
|
|
- new MiniCssExtractPlugin({ filename: "[name].css" }),
|
|
|
...(process.env.ANALYZER === "true" ? [new BundleAnalyzerPlugin()] : []),
|
|
|
],
|
|
|
externals: {
|