You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.
var React = require('react');
var ReactDOM = require('react-dom');
/* Import from node_modules without bundle-loader */
var bundleTest = require('react-bundle-loader-test/index.js');
/* works fine! */
bundleTest();
/* Import from node_modules with bundle-loader */
var bundleTest_lazy = require('bundle-loader?lazy!react-bundle-loader-test/index.js');
/* Uncaught TypeError: cb is not a function */
bundleTest_lazy();
/*
*** content of react-bundle-loader-test/index.js in node_modules ***
module.exports = function() {
console.log('Test react-bundle-loader-test ...');
}
*/
ReactDOM.render(<h1>Hello React!</h1>, document.getElementById('root'));
I'm using two projects in my real case. One called widgets and another main project. The main project contains widgets as a dependency, so I need to load the widgets as asynchronous.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is it possible to use with modules of node_modules?
When using this i receive TypeError: cb is not a function
My code is:
import Display from 'bundle-loader?lazy!../../node_modules/<module>/widgets/Display/Display.component.jsx';
The text was updated successfully, but these errors were encountered: