From d1713bc84226d2a3656e609c2c351fb04cf9b747 Mon Sep 17 00:00:00 2001 From: Ian Mobley Date: Mon, 2 Apr 2018 19:27:04 -0700 Subject: [PATCH] Convert react-loadable/webpack test to commonJS It doesn't look like destructuring will work when using require. --- types/react-loadable/test/webpack.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/types/react-loadable/test/webpack.ts b/types/react-loadable/test/webpack.ts index 08885e418d..5549dfdc4e 100644 --- a/types/react-loadable/test/webpack.ts +++ b/types/react-loadable/test/webpack.ts @@ -1,11 +1,10 @@ -import * as webpack from 'webpack'; -import { ReactLoadablePlugin, getBundles } from 'react-loadable/webpack'; +import webpack = require('webpack'); +import Loadable = require('react-loadable/webpack'); const config: webpack.Configuration = { plugins: [ - new ReactLoadablePlugin(), - new ReactLoadablePlugin({ - filename: 'react-loadable.json' + new Loadable.ReactLoadablePlugin(), + new Loadable.ReactLoadablePlugin({ filename: 'react-loadable.json' }) ] }; @@ -22,4 +21,4 @@ const manifest = { const manifestIds = ['react']; -const bundles = getBundles(manifest, manifestIds); +const bundles = Loadable.getBundles(manifest, manifestIds);