Open wind4gis opened 5 years ago
the current version of this package does not work with html-webpack-plugin v4
Please refer this issue
or
you can try yarn add preload-webpack-plugin@3.0.0-beta.3
I have same error.
Same error for me when using
"preload-webpack-plugin": "^2.3.0"
.
If I add v3.0.0-beta.1 (which is the most recent release indicated here), then I get an error about missing module @babel/runtime/core-js/get-iterator
despite I have the dependency "@babel/runtime": "^7.2.0"
.
Finally what worked is:
npm install --save-dev preload-webpack-plugin@3.0.0-beta.3
Thanks @rappad for the issue link above.
@guirip Yes with preload-webpack-plugin@3.0.0-beta.3 ,its building successfully,but its not adding perload/prefetch . config for this is like below mentioned new PreloadWebpackPlugin({ rel: 'preload', include:['main','vendor'] }),
Webpack version : 4.28.3
fwiw 3.0.0-beta.3 worked for me and generated links
Yes, 3.0.0-beta.3 worked for me too
Interesting... It didn't work for me so I found a workaround using HTMLWebpackPlugin:
<link rel="preload" href="<%= compilation.getAssets().find(asset => /Roboto[.].+[.]woff2/.exec(asset.name)).name %>" as="font" type="font/woff2" crossorigin>
Confirming, same error, specifying 3.0.0-beta.3
fixed the issue.
Looking forward to when it's not a beta! (:
I'm using CRA which using
However, it shows error
![snipaste_2018-12-26_16-12-57](https://user-images.githubusercontent.com/3963291/50438488-245e9c00-0929-11e9-9b98-bcac68be8725.png)
"html-webpack-plugin": "4.0.0-alpha.2"
When I write it on my package.jsonis the plugin don't support webpack4???