Skip to content

Commit 7684cbd

Browse files
committed
Use no-eval source maps instead
eval is blocked by CSP in the addons settings page
1 parent 766d957 commit 7684cbd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src-main/protocols.js

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const FILE_SCHEMES = {
5656
const MIME_TYPES = new Map();
5757
MIME_TYPES.set('.html', 'text/html');
5858
MIME_TYPES.set('.js', 'text/javascript');
59+
MIME_TYPES.set('.map', 'application/json');
5960
MIME_TYPES.set('.txt', 'text/plain');
6061
MIME_TYPES.set('.json', 'application/json');
6162
MIME_TYPES.set('.wav', 'audio/wav');

webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
44

55
const base = {
66
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
7-
devtool: process.env.NODE_ENV === 'production' ? false : 'eval',
7+
devtool: process.env.NODE_ENV === 'production' ? false : 'cheap-source-map',
88
target: 'web',
99
module: {
1010
rules: [

0 commit comments

Comments
 (0)