Import a non-ES6 module with Webpack

Kent C. Dodds
InstructorKent C. Dodds

Share this video with your friends

Send Tweet

When you have a dependency that does not export itself properly, you can use the exports-loader to force it to export the pieces of the file that you need.

Jean
Jean
~ 5 years ago

Can you please help me understand how to set-up for a multi-tenant app?

Maximilian Koch
Maximilian Koch
~ 5 years ago

Webpack is doing tree shaking. Is that files, which are imported using the export-loader?

Kent C. Dodds
Kent C. Doddsinstructor
~ 5 years ago

I don't think that it will work with files imported using the export-loader. It only works with files that are using ES Modules.

Matt O'Toole
Matt O'Toole
~ 3 years ago

The download link appears to download lesson #11.