shedges34

static imports

Apr 27th, 2021
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Module export and import example
  2.  
  3. //title.js
  4. export const gametitle = "My Rogue";
  5.  
  6. //main.js
  7. import {gametitle} from './title.js';
  8. (function(w) {
  9. ...
  10.  
  11. //main.js line 954 change
  12. for (const a in attrs) { node[a] = attrs[a]; }
  13.  
  14. //index.html
  15.   <script type="module" src="main.js" id="main"></script>
  16.  
RAW Paste Data