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

Webpack produced JS are not group and world readable #356

Open
thesamet opened this issue Jul 17, 2020 · 0 comments
Open

Webpack produced JS are not group and world readable #356

thesamet opened this issue Jul 17, 2020 · 0 comments

Comments

@thesamet
Copy link

When using fastOptJS::webpack the produced fastopt.js file has the permision rw------- (only user readable and writable). Anything else under target tends is generally world and group readable (rw-r--r--), so this specific file seem to be an exception.

In a development use case, there is an nginx docker container that has target/scala-2.13/scalajs-bundler/main available to it as a volume so it can serve files produced by the host. Due to this, nginx (which runs as different non-root user), can't access the file.

My workaround has been to add the following to my build:

Compile / fastOptJS / webpack := {
    val result = (Compile / fastOptJS / webpack).value
    result.foreach {
        (af: Attributed[File]) =>
            IO.chmod("rw-r--r--", af.data)
    }
    result
}
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

1 participant