How does create-react-app support es7's stage-0 proposal without eject?

refer to antd"s custom scheme, introduce babel-plugin-import and react-app-rewired, and add .bablrc file, but not successfully
is it necessary to eject? how to make create-react-app support stage-0, without eject?


Code paste up


there is also a configuration file that can be modified when there is no eject. Add

to the configuration file in node_modules/react-scripts/config,.
{
            test: /\.(js|jsx|mjs)$/,
            include: paths.appSrc,
            loader: require.resolve('babel-loader'),
            options: {
              // @remove-on-eject-begin
              babelrc: true,
              presets: [require.resolve('babel-preset-react-app'),'stage-0'],
              // @remove-on-eject-end
              // This is a feature of `babel-loader` for webpack (not Babel itself).
              // It enables caching results in ./node_modules/.cache/babel-loader/
              // directory for faster rebuilds.
              cacheDirectory: true,
            },
Menu