K
K
KlassT2019-04-23 14:09:57
webpack
KlassT, 2019-04-23 14:09:57

Exports is not defined how to rewrite to custom loader for webpack 4?

There is a custom webpack loader written for webpack 3. There is such code

return `
    ...
   React.createElement(exports.default)
   ...
`

Everything is good in webpack 3. In webpack 4 it says Uncaught ReferenceError: exports is not defined. What has changed in webpack 4 and how to solve the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question