react-rails icon indicating copy to clipboard operation
react-rails copied to clipboard

Using Asset Pipeline - ReactDOM is undefined.

Open tblanchard opened this issue 5 years ago • 3 comments

In react_ujs.js

/***/ (function(module, exports, webpack_require) {

var React = webpack_require(3) var ReactDOM = webpack_require(4) var ReactDOMServer = webpack_require(5)

ReactDOM comes up undefined.

Searching the code for symbol WEBPACK_EXTERNAL_MODULE_4 shows it being used but I have no idea what is supposed to define it.

I don't understand webpack so I may be missing something fundamental.

tblanchard avatar Oct 15 '19 17:10 tblanchard

This looks like a webpack issue. Could you try asking in Webpacker or on Stack Overflow? Both those locations are a bit better equipped to help. I'd need an example project in order to assist you.

BookOfGreg avatar Oct 19 '19 20:10 BookOfGreg

I don't understand why webpack is involved at all when I'm using asset pipeline

tblanchard avatar Oct 19 '19 21:10 tblanchard

Can you post a reproduction? Your initial message was not clear enough about what you are doing or what caused the above message. In Rails 6 Webpack is the default pipeline and your message said the word Webpack in it, making it a natural assumption for me.

Please post a reproduction.

BookOfGreg avatar Oct 19 '19 21:10 BookOfGreg

@tblanchard Please share the reproduction steps and let us know in case of any concerns. Closing this issue for now.

alkesh26 avatar Nov 08 '22 10:11 alkesh26