Closed liuxiaoer closed 4 years ago
a part of config below: HtmlWebpackPlugin { options: { template: '/xxxxx/first/index.html', filename: 'first.html', ..... } }, HtmlWebpackPlugin { options: { template: '/xxxxx/second/index.html', filename: 'second.html', ..... } }, HtmlWebpackExternalsPlugin { externals: [ { module: (function(){console.log('react'); return 'react'}()), entry: 'https://11.url.cn/now/lib/16.2.0/react.min.js', global: 'React', }] }
The output file: firest.html <!DOCTYPE html>
second.html <!DOCTYPE html>
The second.html repeat call HtmlWebpackExternalsPlugin. if I have the third.html config ,the external file will appear three times in third.html. I've on idea how to get the right file.
third.html
Sorry.I's not a issue
a part of config below: HtmlWebpackPlugin { options: { template: '/xxxxx/first/index.html', filename: 'first.html', ..... } }, HtmlWebpackPlugin { options: { template: '/xxxxx/second/index.html', filename: 'second.html', ..... } }, HtmlWebpackExternalsPlugin { externals: [ { module: (function(){console.log('react'); return 'react'}()), entry: 'https://11.url.cn/now/lib/16.2.0/react.min.js', global: 'React', }] }
The output file: firest.html <!DOCTYPE html>
second.html <!DOCTYPE html>
The second.html repeat call HtmlWebpackExternalsPlugin. if I have the
third.html
config ,the external file will appear three times inthird.html
. I've on idea how to get the right file.