Use no-eval source maps instead

eval is blocked by CSP in the addons settings page
This commit is contained in:
Muffin 2024-05-15 19:34:34 -05:00
parent 766d957f3c
commit 7684cbd438
2 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ const FILE_SCHEMES = {
const MIME_TYPES = new Map();
MIME_TYPES.set('.html', 'text/html');
MIME_TYPES.set('.js', 'text/javascript');
MIME_TYPES.set('.map', 'application/json');
MIME_TYPES.set('.txt', 'text/plain');
MIME_TYPES.set('.json', 'application/json');
MIME_TYPES.set('.wav', 'audio/wav');

View File

@ -4,7 +4,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const base = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
devtool: process.env.NODE_ENV === 'production' ? false : 'eval',
devtool: process.env.NODE_ENV === 'production' ? false : 'cheap-source-map',
target: 'web',
module: {
rules: [