import() breaks in Angular 7.2.3 + Webpack 4.28
问题 I have the following code : var path = "./relative/path/to/" + fileName + ".json"; import(path).then(cb); The import works as expected in my Electron demo (which uses Webpack 3.12). It breaks in my Angular demo (which uses Webpack 4.28). My Angular demo has the following Webpack config : module.exports = { node: { fs: 'empty' } }; It produces the following error at runtime : Unhandled Promise rejection: Cannot find module './resources/symbology/labelTemplates/labelTemplates.json' ; Zone: