BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.18k stars 756 forks source link

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' #1844

Open WuglyakBolgoink opened 3 years ago

WuglyakBolgoink commented 3 years ago

Issue details

after upgrading to v2.26.14 I see this error:

image

Steps to reproduce/test case

Please provide necessary steps for reproduction of this issue, or better the reduced test case (without any external dependencies).

Please specify which version of Browsersync, node and npm you're running

Affected platforms

Browsersync use-case

If CLI, please paste the entire command below

{cli command here}

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

my config:

{
        server: {
            baseDir: './build/webapp',
            middleware: [historyApiFallback()],
            directory: true,
            serveStaticOptions: {
                extensions: [
                    'html'
                ]
            }
        },
        tunnel: false,
        open: true,
        host: 'localhost',
        port: 3030,
        logPrefix: 'myapp',
        logLevel: 'debug',
        notify: false,
        ui: false,
        files: [
            './build/webapp/**/*.{html,css,js}'
        ],
        watchEvents: 'change',
        watch: true,
        ignore: [],
        single: true,
        logFileChanges: true,
        browser: [
            // 'Chrome' // tested on Windows
            'Google Chrome' // tested on MacOS
            // 'firefox'  // tested on MacOS
        ],
        reloadOnRestart: false,
        reloadDelay: 2000,
        reloadDebounce: 2000,
        injectChanges: true,
        minify: false,
        watchOptions: {
            ignored: 'node_modules'
        },
        middleware: {}
    }
WuglyakBolgoink commented 3 years ago

after adding in CSP config : image

example of one line:

DevTools failed to load SourceMap: Could not load content for webpack://browser-sync-client/node_modules/rxjs/operators/subscribeOn.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
WuglyakBolgoink commented 2 years ago

any updates?