Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Published JS requires unsafe-eval #24

Open
jamesarosen opened this issue Jan 28, 2016 · 2 comments
Open

Published JS requires unsafe-eval #24

jamesarosen opened this issue Jan 28, 2016 · 2 comments

Comments

@jamesarosen
Copy link

The published JS includes lines that look like

require.register("darsain-event/index.js", Function("exports, require, module",
"'use strict';\n\
\n\
/**\n\
...

This is valid JavaScript, but violates a Content Security Policy unless the site allows unsafe-eval (which is strongly recommended against).

Would it be possible to rebuild with non-stringified dependencies?

@adam-knights
Copy link

@darsain any chance of an update on this or whether we should look at fixing this ourselves?

@darsain
Copy link
Owner

darsain commented Mar 26, 2016

The issue here is that the current distribution files are configured to be build with sourcemaps included. That's why its all evaled. It's the easiest way how to get sourcemaps in.

I've described the situation of this and all of my other projects here: #28 (comment)

As it says in that comment, I never intended these dist files to be used in production.
The quickest way for you how to get un-evaled version is to grab the minified distribution file, which doesn't inlude sourcemaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants