customize-cra icon indicating copy to clipboard operation
customize-cra copied to clipboard

Example of "addWebpackExternals" has a error

Open liningftp opened this issue 4 years ago • 1 comments

Problem

https://github.com/arackaf/customize-cra/blob/master/api.md addWebpackExternals(deps)

addWebpackExternals({
  react: "React",
  "react-dom": "ReactDom"
});

The ReactDom should be ReactDOM

Official definition

https://unpkg.com/[email protected]/umd/react-dom.development.js

/** @license React v17.0.2
 * react-dom.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
  typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
  (global = global || self, factory(global.ReactDOM = {}, global.React));
}(this, (function (exports, React) { 'use strict';

Please reference global.ReactDOM

liningftp avatar Sep 15 '21 03:09 liningftp

I don't understand, The ReactDom should be ReactDOM

promiseLC avatar Aug 31 '23 15:08 promiseLC