Using node-serialport
with webpack
without any errors.
There are two important steps to get it working:
- require serialport in the
index.html
file (via another script file or inline) - add
serialport
to webpack's externals (seewebpack.config.js
file)
To run the example:
npm run watch
to build with webpacknpm start
to open electron window