The documentation is lacking instructions for how to implement webpack.ignorePlugin()
Would be nice to have direct access to these things like previous versions of quasar.
https://quasar-framework.org/guide/app-quasar.conf.js.html#Extending-Webpack-Config-Object
Sorry I'm lost
chainWebpack(chain){
chain.IgnorePlugin(/^encoding$/, /node-fetch/)
}
I get
chain.IgnorePlugin is not a function
You're not paying attention to the docs. Don't have time to elaborate, but read closely. Also check all links highlighted there if you want to go with WebpackChain. For beginning, I'd suggest using extendWebpack() instead: cfg.plugins.push(....)
More examples in the documentation would be great. I spent 30 minutes reading through your documentation and webpack official docs before posting.
I read this page: https://webpack.js.org/plugins/ignore-plugin/#src/components/Sidebar/Sidebar.jsx
I found no reference to plugins.push in the documentation:
so all I have to go on are your examples.
cfg.plugins.push(
IgnorePlugin(/^encoding$/, /node-fetch/)
)
I tried this and it doesn't work.
In extendWebpack() the "cfg" param is the webpack config object. What is there to document?
The documentation I'm reading doesn't mention the config object.
https://webpack.js.org/plugins/ignore-plugin/#src/components/Sidebar/Sidebar.jsx
I'll have to do more research....
Please contact me tomorrow on Discord. This is so simple you won't believe. You're confusing a lot of things, but a quick talk will fix talk.
Discord is not good place for such cases - now I'm facing similar issue and I will have to ask there again as it is not documented and gone in discord history.
@pjar Hi,
First of all, github tickets are not meant for questions but for issues.
Secondly, I won't duplicate Webpack's documentation into Quasar's. I believe this is enough: https://quasar-framework.org/guide/app-quasar.conf.js.html#Extending-Webpack-Config-Object
You take a webpack config object (generated by the CLI) and you change it to your desire.
Sometimes people get stuck because of making assumptions (example: chainWebpack(chain){ chain.IgnorePlugin(....) } without clicking on the webpack-chain link in docs to see how it works, no pun intended) so in order for me to post a definitive answer here I'd have to take all possible pitfalls (huge number, since webpack is so complex) of which devs might get into. Which makes it all much harder and if I do that it takes a whole lot of time from developing the framework itself, which I don't think anyone wants. Interaction makes all the difference (it shorts out the time needed to solve something) in a case like this and the Discord community is thriving. So please post a question there or get into the special Patron's channel to get your answer on the quickest possible time.
Thank you.
I think what the quasar documentation needs is an example that says:
If you want to ignore module xxx then in file YYY, in the ZZZ section, you need to add the following: "blah blah xxx blah"
Search for '???' in the webpack documentation for more details.
You don't exhaustively need to re-document everything in the webpack documentation. But, because quasar is wrapping stuff, and therefore webpack docs/answers cannot be used directly, you do need to "re-document" a couple of examples. So we have a way to map webpack explanations that we find into quasar files and concepts.
I agree, I got stuck on this issue and went back to using an older version of Quasar. Every layer of abstraction needs to be fully documented.
I just worked this out, posted it here: https://stackoverflow.com/a/57674342/841830
I didn't end up using ignorePlugin() in the end, but I do show how to modify the cfg object.
One thing I couldn't work out: the webpack examples have anchors in their regex (e.g. https://stackoverflow.com/a/41876059/841830), but it didn't work if I put them in. I don't know if that is a Quasar difference, or WebPack behaviour has changed (that example is for webpack 1.x), or something special about my setup.
Looks like Quasar is evolving really fast :) the link that @rstoenescu posted above looks like they've moved here: https://quasar.dev/quasar-cli/cli-documentation/handling-webpack
Most helpful comment
Discord is not good place for such cases - now I'm facing similar issue and I will have to ask there again as it is not documented and gone in discord history.