feat(componentLoader): Add external component loader module

For render hijacking to work, imports need to be peformed at core level.
This loader ensures that Webpack is able to resolve the paths to the
external components' code, without the need for extra loaders or custom
built plugins.

Signed-off-by: Adrian Oprea <adrian@oprea.rocks>
This commit is contained in:
Adrian Oprea 2018-01-16 10:14:35 +02:00
parent ed44762ff2
commit 894e0afd0a
3 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,3 @@
export default {
}

View file

@ -0,0 +1,6 @@
import { createLoader } from 'react-hijack';
const componentLoader = createLoader((module) => import('' + module));
export default componentLoader;