Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye64 committed Mar 13, 2022
2 parents aff05ce + cf3b495 commit fc3c72f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions app-extension/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
*/
function extendWebpack (cfg, { isClient, isServer }, api) {
function extendWebpack (cfg) {
cfg.module.rules.push({
test: /\.worker\.js$/,
use: {
Expand All @@ -13,13 +13,15 @@ function extendWebpack (cfg, { isClient, isServer }, api) {
})
}

const extendConf = function (conf) {
const extendConf = function (conf, api) {
// make sure qpdfviewer boot file is registered
conf.boot.push('~@quasar/quasar-app-extension-qpdfviewer/src/boot/qpdfviewer.js')
console.log(` App Extension (qpdfviewer) Info: 'Adding qpdfviewer boot reference to your quasar.conf.js'`)

// make sure boot & component files transpile
conf.build.transpileDependencies.push(/quasar-app-extension-qpdfviewer[\\/]src/)
if (api.hasVite !== true) {
// make sure boot & component files transpile
conf.build.transpileDependencies.push(/quasar-app-extension-qpdfviewer[\\/]src/)
}

// make sure qpdfviewer css goes through webpack to avoid ssr issues
conf.css.push('~@quasar/quasar-app-extension-qpdfviewer/src/component/pdfviewer.sass')
Expand All @@ -36,6 +38,8 @@ module.exports = function (api) {
// extend quasar.conf
api.extendQuasarConf(extendConf)

// extend webpack config
api.extendWebpack(extendWebpack)
if (api.hasVite !== true) {
// extend webpack config
api.extendWebpack(extendWebpack)
}
}

0 comments on commit fc3c72f

Please sign in to comment.