title: import vuejs router component with webpack
body: <p>In vuejs, when I import a component in the router as such: import('@/layout') it works fine and as expected. If one had to stringify the outcome, it would look like this:</p>
  <pre><code>function ()
  {
     return Promise.resolve().then
     (
            function ()
            {
                return Object(C_Users_Admin_Documents_GitHub_MyProject_node_modules_babel_runtime_helpers_esm_interopRequireWildcard__WEBPACK_IMPORTED_MODULE_1__[&quot;default&quot;])(__webpack_require__(/*! @/layout */ &quot;./src/layout/index.vue&quot;));
            }
     );
  }
  </code></pre>
  <p>On the other hand when I feed in the string part dynamically as such: import(route.meta.componentPath) it does not resolve and looks like this:</p>
  <pre><code>function ()
  {
     return Promise.resolve(&quot;&quot;.concat(route.meta.componentPath)).then
     (
            function (s)
            {
               return Object(C_Users_Admin_Documents_GitHub_MyProject_node_modules_babel_runtime_helpers_esm_interopRequireWildcard__WEBPACK_IMPORTED_MODULE_1__[&quot;default&quot;])(__webpack_require__(&quot;./src/store/modules sync recursive&quot;)(s));
            }
     );
  }
  </code></pre>
  <p>Notice the difference in the resolve and <em>webpack_require</em>_ parts (<strong>SCROLL TO THE RIGHT</strong>)</p>
  <p>How shall I get the latter to work? I am totally new to webpack but all errors/answers are pointing to it right? All I have set up is babel.config.js as follows:</p>
  <pre><code>module.exports = {
        presets: [
          '@vue/cli-plugin-babel/preset'
        ],
        'env': {
          'development': {
            // babel-plugin-dynamic-import-node plugin converts all import() to require().
            // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
            'plugins': ['dynamic-import-node']
          }
        }
      }
  
  </code></pre>
  <p>which I also am not 100% sure what it does underneath.</p>