SimenB / add-asset-html-webpack-plugin

Add a JavaScript or CSS asset to the HTML generated by html-webpack-plugin
MIT License
336 stars 42 forks source link

There is an extra auto in the file path #260

Open jingzhiz opened 2 years ago

jingzhiz commented 2 years ago

When I configure this way why is the script tag src property path 'auto/dll_react.js' in the resulting html file not 'dll_react.js'

new HtmlWebpackPlugin({
  template: './index.html'
}),
new VueLoaderPlugin(),
new ProvidePlugin({
  axios: 'axios',
  get: ['axios', 'get']
}),
new DllReferencePlugin({
  manifest: pathResolve('./dll/react.manifest.json')
}),
new AddAssetHtmlWebpackPlugin({
  filepath: resolve(__dirname, '../dll/dll_react.js')
})

image

mouday commented 2 years ago

i want to know how to resolve it too!

soonssa commented 2 years ago

new AddAssetHtmlWebpackPlugin({ filepath: resolve(__dirname, '../dll/dll_react.js'), outputPath: '', publicPath: '', })