node-screeps-api icon indicating copy to clipboard operation
node-screeps-api copied to clipboard

React.js Support + screeps-api npm package does not contain src folder

Open DefaultO opened this issue 1 year ago • 0 comments

(1) I am trying to get this library working on a React.js App. The first issue I was facing is the problem with it not getting resolved because the package.json contains this in a line: "module": "src/index.js". I solved that by downloading this repository as a zip and copying the src folder into the screeps-api folder in my projects node_modules folder.

image

(2) Now I am facing the issue that your script turns my React.js App white as soon I try to import ScreepsAPI from the package. This implies there is a syntax error. Could you perhaps make this compatible with React.js? It happens as soon I try to import ScreepsAPI using import { ScreepsAPI } from 'screeps-api';.

I am using Vite.js for development. But should happen on React.js in general.

DefaultO avatar May 13 '23 22:05 DefaultO