v0.15: custom webpack config
-
Back from some backend dev, I decided to give v0.15 beta a try.
First I was pleased by the new super-easy configuration system.
I use Pug and I need to transpile to javascript too, so I started to look how add loaders to the webpack config.
Then I realized that v0.15 webpack config is not in the app directory but is part of the quasar-cli global module (
/usr/local/lib/node_modules/quasar-cli/lib/build/webpack-config.js
on my Ubuntu machine), so even if I modify it it will be overwritten at the next quasar-cli update.Am I missing something or (except for mode, theme and target) does v0.15 make impossible to tweak webpack???
-
-
I think
vue-loader
works out of the box with Pug if you havepug-loader
installed as (dev) dependency, so you don’t need to change Webpack configs for it. -
Webpack-related configurations are now handled in
quasar.conf.js
file. I’m not sure about the format, as the docs are still WIP, but I’d try to play withextendWebpack
option.
-
-
@leopiccionia thank you so much.
- you’re right for Pug, I forgot it was automatic
- Great! Right now I’m customizing the
build.extendWebpack
function ofquasar.conf.js
to add loaders to my Vue single component files. I guess the documentation will talk about that.
I’m feeling better now…