Skip to content

Instantly share code, notes, and snippets.

View ggriffithsIDBS's full-sized avatar

George Griffiths ggriffithsIDBS

View GitHub Profile
@ggriffithsIDBS
ggriffithsIDBS / app.js
Last active March 3, 2019 21:45
dynamic import expressions webpack-babel-multi-target-plugin
// use case: folder could be injected via some feature detection at run time
// webpack statically builds these bundles at build time
// THIS LINE CAUSES THE ISSUE - dynamic import with expression
// make sure have a file called plugin.js e.g. plugins/whatever/plugin.js
import(`./plugins/${dynamic_feature}/plugin.js`);