fix: remove unnecessary files from builds

This commit is contained in:
xenticore
2025-05-01 18:51:21 -04:00
parent 91f43295e8
commit 9946cafaf5
3 changed files with 4 additions and 2 deletions

BIN
bun.lockb

Binary file not shown.

View File

@@ -53,6 +53,7 @@
"postcss-url": "^10.1.3",
"style-loader": "^4.0.0",
"to-string-loader": "^1.2.0",
"url-loader": "^4.1.1"
"url-loader": "^4.1.1",
"webpack-remove-empty-scripts": "^1.0.4"
}
}

View File

@@ -1,6 +1,7 @@
var path = require('path');
var CopyPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
var webpack = require('webpack');
var fs = require('fs');
var package = require('./package.json');
@@ -24,7 +25,6 @@ const defines = {
module.exports = [
// WebExtension
{
devtool: "source-map",
entry: {
content: './src/content/content.ts',
background: './src/background/background.ts',
@@ -93,6 +93,7 @@ module.exports = [
extensions: [".ts", ".tsx", ".js", ".json"]
},
plugins: [
new RemoveEmptyScriptsPlugin(),
new webpack.DefinePlugin({ ...defines, __ENV_WEBEXTENSION: true, __ENV_USERSCRIPT: false}),
new CopyPlugin({ patterns: [
{ from: './src/manifest.json', to: 'manifest.json',