Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"devDependencies": {
"@lavamoat/preinstall-always-fail": "^2.0.0",
"@lavamoat/webpack": "^0.3.0-beta.0",
"@localazy/cli": "^1.7.5",
"@types/chrome": "^0.0.259",
"@types/object-hash": "^2.2.1",
Expand Down
20 changes: 14 additions & 6 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const WextManifestWebpackPlugin = require('wext-manifest-webpack-plugin');
const DotenvPlugin = require('dotenv-webpack');
const LavaMoatPlugin = require('@lavamoat/webpack');

const srcDir = path.join(__dirname, '..', 'src');
const targetBrowser = process.env.TARGET_BROWSER;
Expand Down Expand Up @@ -43,17 +44,20 @@ module.exports = {
{
test: /\.css$/i,
include: path.resolve(srcDir),
use: ['style-loader', 'css-loader', 'postcss-loader'],
use: ['style-loader', 'css-loader', 'postcss-loader', LavaMoatPlugin.exclude],
},
{
type: 'javascript/auto', // prevent webpack handling json with its own loaders,
test: /manifest\.json$/,
use: {
loader: 'wext-manifest-loader',
options: {
usePackageJSONVersion: true,
use: [
{
loader: 'wext-manifest-loader',
options: {
usePackageJSONVersion: true,
},
},
},
LavaMoatPlugin.exclude,
],
exclude: /node_modules/,
},
],
Expand All @@ -69,6 +73,10 @@ module.exports = {
},

plugins: [
new LavaMoatPlugin({
generatePolicy: true,
diagnosticsVerbosity: 2,
}),
new WextManifestWebpackPlugin(),
new CopyPlugin({
patterns: [
Expand Down
Loading