can options be added to npm package.json dependencies?

前端 未结 1 2005
眼角桃花
眼角桃花 2021-02-15 11:54

I have a dependency with the sqlite3 package.

By default, upon install, the sqlite3 package downloads and uses a pre-packaged version of the sqlite3 engine. This can som

1条回答
  •  忘了有多久
    2021-02-15 12:34

    An alternative is to use the scripts member and setup the install script under the preinstall or postinstall hook:

    "scripts": {
      "preinstall": "npm install --build-from-source --sqlite=/path/to/sqlite sqlite3"
    },
    

    0 讨论(0)
提交回复
热议问题