Skip to content

Do I need to convert the module with browserify when use it in client end? #44

@lhf552004

Description

@lhf552004

Hi @garrows , do I need to convert the module with browserify?
I convert the module firstly:
browserify index.js > browser-serialport.js
When I try to get the serialPort in the html, but there is error say cannot find:
<script src="require-2.2.0.js"></script>
<script src="browser-serialport.js"></script>
<script>
var SerialPort = require("browser-serialport").SerialPort;
</script>

Where is wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions