mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
This package has a single export that includes both NodeJS and browser modules. When a web project imports this library, the build generates a bunch of warnings, like this in vite: [plugin vite:resolve] Module net has been externalized for browser compatibility... [plugin vite:resolve] Module stream has been externalized for browser compatibility... ... We can clean this up by creating a special browser-only export. Bundlers like Vite and Webpack know to choose the 'browser' export in projects that are web-only (not NodeJS). This change adds a 'browser' export and updates the documentation to use browser-only examples.
25 lines
571 B
JSON
25 lines
571 B
JSON
{
|
|
"name": "@liamcottle/meshcore.js",
|
|
"version": "1.10.0",
|
|
"description": "",
|
|
"main": "src/index.js",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"browser": "./src/browser.js",
|
|
"import": "./src/index.js",
|
|
"default": "./src/index.js"
|
|
},
|
|
"./browser": "./src/browser.js",
|
|
"./node": "./src/node.js"
|
|
},
|
|
"scripts": {
|
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
},
|
|
"author": "Liam Cottle <liam@liamcottle.com>",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@noble/curves": "^1.8.1",
|
|
"serialport": "^13.0.0"
|
|
}
|
|
}
|