title: How do i pass variable from app.js to index.html?
body: <p>I am a beginner for webpack and EMCA script, although i do not consider i am new JS developer let say i use JS here and there but not my main development langauge, and I got confused by all the imports of js and how it can be applied to my framework7 apps. </p>
  
  <p>Sorry for some simple questions below,</p>
  
  <p>i have my src/js/app.js</p>
  
  <blockquote>
  <pre><code>import $$ from 'dom7';
  import Framework7 from 'framework7/framework7.esm.bundle.js';
  
  // Import F7 Styles
  import 'framework7/css/framework7.bundle.css';
  
  // Import Icons and App Custom Styles
  import '../css/icons.css';
  import '../css/app.less';
  
  // Import own application auth class
  import 'app-auth/lib/index.js';
  
  // Import Routes
  import routes from './routes.js';
  
  // Import main app component
  import App from '../app.f7.html';
  
  // trying to initialize the Auth class 
  // not sure whether should be using "const" or "var"
  var auth = new Auth();
  
  var app = new Framework7({
    root: '#app', // App root element
    component: App, // App main component
  
    name: 'mos_app', // App name
    theme: 'auto', // Automatic theme detection
  
  
    // App routes
    routes: routes,
  
    // ** i have tried below, but not sure is correct ? 
    auth: auth,
  });
  </code></pre>
  </blockquote>
  
  <p>so from the above app.js, not sure how it is passed to the 
  index.html or the rest of my pages_x.html ? </p>
  
  <blockquote>
  <pre><code>&lt;!-- built styles file will be auto injected --&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;script&gt;
      // Method login
      // parameters username, password, database
      console.log(app.name);
      app.auth.login('admin', 'admin', 'mydbname').then(console.log);
  
      // Method logout
      app.auth.logout().then(console.log);
    &lt;/script&gt;  
    &lt;div id="app"&gt;&lt;/div&gt;
  
    &lt;!-- built script files will be auto injected --&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  </blockquote>
  
  <p>when I checked my console, errors saying that variable is not
  defined, I not sure where to begin and what to google search for, but some how is my insufficient knowledge of the JS ECMA. Do appreciate if any of you can
  provide me some advice on how to get that to work? </p>
  
  <p>I basically need to load my own node_modules and then initialize it and use it, which
  the node_module is a class.</p>
  
  <p>Thanks a lot.</p>