mmiller42 / html-webpack-externals-plugin

Webpack plugin that works alongside html-webpack-plugin to use pre-packaged vendor bundles.
MIT License
99 stars 16 forks source link

externals copied more times #55

Closed liuxiaoer closed 4 years ago

liuxiaoer commented 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>First

second.html <!DOCTYPE html>Second

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.

liuxiaoer commented 4 years ago

Sorry.I's not a issue