Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Force use of a specific prebuild binary #80

Open
jagu-sayan opened this issue Nov 8, 2018 · 1 comment
Open

Force use of a specific prebuild binary #80

jagu-sayan opened this issue Nov 8, 2018 · 1 comment

Comments

@jagu-sayan
Copy link

Hello,

I am on OS X and I want to build my project with a iltorb linux prebuild. Because sometimes, I manually deploy my project on a linux server.
I don't find an easy way to do that :/

I also use webpack with this config to use iltorb:

{
  module : {
    rules : [{
      // Load brotli binary (in ./node_modules/iltorb/build/bindings/iltorb.node)
      test : /\.(node)$/,
      use : [{
        loader  : "file-loader",
      }]
    }]
  }
}
@oohnoitz
Copy link
Collaborator

oohnoitz commented Nov 9, 2018

I'm not exactly sure how iltorb is being used in your project or why that rule is required in webpack. As with any native module, .node binaries are either downloaded (if pre-built binaries are available) or compiled for your environment.

Typically there should be a build process as part of the deployment process that should handle installing dependencies and handling any additional assets bundling. Copying node_modules directory isn't advised unless the build is done in an environment that's similar to the production environment. In this case, it isn't recommended because the binary compiled for OSX shouldn't work on Linux.

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

No branches or pull requests

2 participants