The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Import a non-ES6 module with Webpack

Import a non-ES6 module with Webpack

4:20
When you have a dependency that does not export itself properly, you can use the [`exports-loader`](https://npmjs.com/package/exports-loader) to force it to export the pieces of the file that you need.
Watch this lesson now
Avatar
egghead.io

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.

Avatar
Jean

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

Avatar
Maximilian Koch

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

Avatar
Kent C.

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.

In reply to Maximilian Koch
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?