create-react-app是通过什么方法把public中的静态文件转移到打包后的dist文件夹中的?

最近在学习webpack,一般会使用copy-webpack-plugin把静态文件不打包直接移动到打包后目录,但我解压了create-react-app的webpack配置,却发现他没有使用这个插件,webpack.config文件里也没有找到类似的插件,那他是使用什么方法转移静态文件的呢?求解答

阅读 2.9k
1 个回答

开源项目看源码
https://github.com/facebook/c...

.then(previousFileSizes => {
    // Remove all content but keep the directory so that
    // if you're in it, you don't end up in Trash
    fs.emptyDirSync(paths.appBuild);
    // Merge with the public folder
    copyPublicFolder();
    // Start the webpack build
    return build(previousFileSizes);
  })
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题