This repository was archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
jsdom and webpack build problems #59
Labels
Comments
I'm confused. Are you saying that local builds no longer work?
|
Local build only works if node_modules are present at runtime.
Ideally the node_modules should be webpack compile time dependencies.
(You can also notice that bw.js is a lot smaller in 1.7.1 because a lot of
the deps aren't bundled)
You can reproduce the runtime dependency problem by:
```
- npm run build
- cp build/bw.js /tmp/bw.js (just copy the webpack output anywhere outside)
the repo
- cd /tmp
- node ./bw.js
- Get error about module not found
```
|
I see. Yes, If you can figure out a way to work around those canvas errors, we can revert it. I couldn't. If you have the node runtime already installed, can't you just install from npm?
|
Hi libertylocked, |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In 1.7.0 when running webpack build, the
bw.js
bundle came with all the dependencies, which is excellent and can be used anywhere nodejs is installed. We can basically runnode /usr/lib/bitwarden-cli/bw.js
without having to use the binary built bypkg
(since it's got a pretty fat nodejs runtime in it).1.7.1 added
jsdom
and the webpack config doesn't build externalnode_modules
into the bundle anymore, making it pretty difficult to use standalone.I tried removing the externals from
webpack.conf.js
but it had some issue with canvas module not found.I wonder if it's still possible to build a standalone javascript bundle?
The text was updated successfully, but these errors were encountered: