Home / Function/ makeConfig() — react Function Reference

makeConfig() — react Function Reference

Architecture documentation for the makeConfig() function in webpack-server.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  49ccd8d6_96de_3b2b_0ec3_78bced8e51e9["makeConfig()"]
  80f854c5_8549_ba18_1294_852a3231fdd4["webpack-server.js"]
  49ccd8d6_96de_3b2b_0ec3_78bced8e51e9 -->|defined in| 80f854c5_8549_ba18_1294_852a3231fdd4
  style 49ccd8d6_96de_3b2b_0ec3_78bced8e51e9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shell/webpack-server.js lines 47–137

const makeConfig = (entry, alias) => ({
  mode: __DEV__ ? 'development' : 'production',
  devtool: __DEV__ ? 'cheap-source-map' : 'source-map',
  stats: {
    preset: 'normal',
    warningsFilter: [
      warning => {
        const message = warning.message;
        // We use ReactDOM legacy APIs conditionally based on the React version.
        // react-native-web also accesses legacy APIs statically but we don't end
        // up using them at runtime.
        return (
          message.startsWith(
            `export 'findDOMNode' (imported as 'findDOMNode') was not found in 'react-dom'`,
          ) ||
          message.startsWith(
            `export 'hydrate' (reexported as 'hydrate') was not found in 'react-dom'`,
          ) ||
          message.startsWith(
            `export 'render' (imported as 'render') was not found in 'react-dom'`,
          ) ||
          message.startsWith(
            `export 'unmountComponentAtNode' (imported as 'unmountComponentAtNode') was not found in 'react-dom'`,
          )
        );
      },
    ],
  },
  entry,
  output: {
    publicPath: '/dist/',
  },
  node: {
    global: false,
  },
  resolve: {
    alias,
  },
  optimization: {
    minimize: false,
  },
  plugins: [
    new Webpack.ProvidePlugin({
      process: 'process/browser',
    }),
    new Webpack.DefinePlugin({
      __DEV__,
      __EXPERIMENTAL__: true,
      __EXTENSION__: false,
      __PROFILE__: false,
      __TEST__: NODE_ENV === 'test',
      'process.env.GITHUB_URL': `"${GITHUB_URL}"`,
      'process.env.EDITOR_URL': EDITOR_URL != null ? `"${EDITOR_URL}"` : null,
      'process.env.DEVTOOLS_PACKAGE': `"react-devtools-shell"`,
      'process.env.DEVTOOLS_VERSION': `"${DEVTOOLS_VERSION}"`,
      'process.env.E2E_APP_REACT_VERSION': `"${REACT_VERSION}"`,
    }),
  ],
  module: {
    rules: [
      {
        test: /\.js$/,
        loader: 'babel-loader',
        options: {
          configFile: resolve(
            __dirname,
            '..',
            'react-devtools-shared',
            'babel.config.js',
          ),
        },
      },
      {
        test: /\.css$/,
        use: [
          {
            loader: 'style-loader',
          },
          {
            loader: 'css-loader',
            options: {

Domain

Subdomains

Frequently Asked Questions

What does makeConfig() do?
makeConfig() is a function in the react codebase, defined in packages/react-devtools-shell/webpack-server.js.
Where is makeConfig() defined?
makeConfig() is defined in packages/react-devtools-shell/webpack-server.js at line 47.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free