Hi there, really liked your project, though I never worked with vanila javascript project before, how can I import node_modules into it?
Wanna import https://github.com/qiao/PathFinding.js/ so i can change path dynamicaly in the game?
var PF = require("pathfinding"); // require is not defined
import * as PF from "node_modules/pathfinding/visual/lib/pathfinding-browser.min.js"; //Uncaught SyntaxError: Cannot use import statement outside a module (at pathfinder.js:2:1)
import { Grid, Finder, AStarFinder } from "pathfinding";. // pathfinder.js:3
Uncaught SyntaxError: Cannot use import statement outside a module (at pathfinder.js:3:1)
Hi there, really liked your project, though I never worked with vanila javascript project before, how can I import node_modules into it?
Wanna import
https://github.com/qiao/PathFinding.js/
so i can change path dynamicaly in the game?Neither of this methods works