Set correct path to lazy-load component using Webpack - ES6
问题 In my app.js file I have the following event inside a function where I import another module (same as in the docs) using the lazy-loading technique: button.onclick = e => import(/* webpackChunkName: "print" */ './print').then(module => { var print = module.default; print(); }); And in my webpack config I set up this (besides Babel, SASS loaders, etc): const path = require('path'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); const UglifyJsPlugin = require('uglifyjs-webpack