title: ES6 - How to modify a variable in other modules
body: <p>in module Global.js:</p>
  
  <pre><code>export let transLog = [];
  </code></pre>
  
  <p>in main:</p>
  
  <pre><code>import * as G from "./Global";
  G.transLog = [];
  </code></pre>
  
  <p>I got a error:</p>
  
  <pre><code>app.js?c99e:19 Uncaught TypeError: Cannot set property q of #&lt;Object&gt; which has only a getter
      at eval (app.js?c99e:19)
      at Object.&lt;anonymous&gt; (bootstrap e92860b74eb6dd40b159:62)
      at __webpack_require__ (bootstrap e92860b74eb6dd40b159:19)
      at bootstrap e92860b74eb6dd40b159:62
      at bootstrap e92860b74eb6dd40b159:62
  </code></pre>
  
  <p>webpack config:</p>
  
  <pre><code>const webpack = require('webpack');
  
  module.exports = {
      entry: './js/app.js',
      plugins: [
          new webpack.SourceMapDevToolPlugin({
              filename: "[file].map"
          })
      ],
      output: {
          filename: './dist/app.js'
      },
      devtool: 'source-map'
  };
  </code></pre>
  
  <p>So, how to modify a variable in other modules?</p>