Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of "addWebpackExternals" has a error #309

Open
liningftp opened this issue Sep 15, 2021 · 1 comment
Open

Example of "addWebpackExternals" has a error #309

liningftp opened this issue Sep 15, 2021 · 1 comment

Comments

@liningftp
Copy link

liningftp commented Sep 15, 2021

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/react-dom@17.0.2/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

@promiseLC
Copy link

I don't understand, The ReactDom should be ReactDOM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants