juneja2 / Beat-the-Blaze

A UI for wildfire information sharing between National Guard and civilian respone agencies.
0 stars 0 forks source link

How to manage JS code and depedencies? #2

Open juneja2 opened 3 years ago

juneja2 commented 3 years ago

I want one minified JS file which contains all the code that is present in each of the JS files that I create.

  1. Can I do this without NodeJS webpack?

  2. Also, does the import and export syntax work on in the like a webpack or other dependency tool managing the JS files? Currently, without any Node JS webpack, I'm getting the following error – "Uncaught SyntaxError: import declarations may only appear at top level of a module" when I try to say – "import { Location } from "./location"

  3. How to handle 2 independent JS files both of which use a common submodule? Do I make compile them separate scripts or just combining them into file is ok?