ractivejs / ractive

Next-generation DOM manipulation
http://ractive.js.org
MIT License
5.94k stars 396 forks source link

Follow up #3335 - Error during Webpack compilation #3369

Closed marcalexiei closed 3 years ago

marcalexiei commented 3 years ago

Description:

We use a custom Webpack loader to pre-parse template on compile time. After upgrading to 1.4.0-build-50 we get the following error:

UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: 
The "data" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined

After some debugging we noticed that the error was caused by require('ractive') inside loader file.

We narrowed down the issue to dom.js and figured out that the cause was the new check for custom elements:

const customStr = 'registerElement' in doc;

Versions affected:

1.4.0-build-50

Platforms affected:

Node

Reproduction:

N/A