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

Document how to use osc.js with webpack #107

Open
colinbdclark opened this issue Feb 5, 2018 · 1 comment
Open

Document how to use osc.js with webpack #107

colinbdclark opened this issue Feb 5, 2018 · 1 comment

Comments

@colinbdclark
Copy link
Owner

As described in a comment on #86, it looks like osc.js can be used with webpack. However, we don't currently provide a simple set of instructions in the README explaining how to do so.

I'm not a webpack user, personally, but I'm hoping someone in the community can contribute some documentation based on their experience using it.

@cannoneyed
Copy link

cannoneyed commented Aug 29, 2018

Just figured out how to get this working using webpack to build for electron, which isn't a normal use case but I'm at least following up on the solution here for posterity. The key is to make webpack treat node_modules as external, so that the node process can use the native libs like serialport

I used webpack-node-externals:

const nodeExternals = require('webpack-node-externals');
...
module.exports = {
    ...
    externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
    ...
};

colinbdclark added a commit that referenced this issue May 25, 2019
Also updates the instructions on how to install osc.js (recommending npm over bower).
colinbdclark added a commit that referenced this issue May 25, 2019
* gh-107:
  gh-107: Adds note about how to use osc.js with WebPack. Also updates the instructions on how to install osc.js (recommending npm over bower).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants