html-externals-webpack-plugin
A webpack plugin that inserts externals into html
usage
// webpack.config.jsconst HtmlExternalsWebpackPlugin = ;moduleexports = plugins: // 生产环境下插入external模块的CDN脚本 isEnvProduction && HtmlWebpackPlugin 'https://cdn.jsdelivr.net/npm/react@16.13.1/umd/react.production.min.js' 'https://cdn.jsdelivr.net/npm/react-dom@16.13.1/umd/react-dom.production.min.js' 'https://cdn.jsdelivr.net/npm/react-router@5.2.0/umd/react-router.min.js'
You can find them in the HTML template:
YuJudge You need to enable JavaScript to run this app.