Skip to content

Commit 2f6d16e

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 6f1ea96 + 7b11696 commit 2f6d16e

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

app-vite/lib/config-tools.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ function createViteConfig (quasarConf, quasarRunMode) {
108108
: build.sourcemap || false
109109
},
110110

111+
optimizeDeps: {
112+
entries: [ 'index.html' ]
113+
},
114+
111115
plugins: [
112116
vueVitePlugin(vueVitePluginOptions),
113117
quasarVitePlugin({

app-vite/lib/quasar-config-file.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,7 @@ class QuasarConfFile {
247247
vitePlugins: [],
248248
env: {},
249249
rawDefine: {},
250-
resolve: {},
251-
css: {},
252-
json: {},
253-
esbuild: {},
254-
rollupOptions: {},
255-
commonjsOptions: {},
256-
dynamicImportVarsOptions: {},
257-
optimizeDeps: {
258-
entries: []
259-
},
260-
worker: {}
250+
resolve: {}
261251
},
262252

263253
ssr: {
@@ -467,10 +457,6 @@ class QuasarConfFile {
467457
cfg.build.target.node = 'node16'
468458
}
469459

470-
if (cfg.build.optimizeDeps.entries.length === 0) {
471-
cfg.build.optimizeDeps.entries = [ 'index.html' ]
472-
}
473-
474460
if (this.#ctx.mode.ssr) {
475461
cfg.build.vueRouterMode = 'history'
476462
}

app-webpack/lib/webpack/create-chain.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const { VueLoaderPlugin } = require('vue-loader')
77
const WebpackProgressPlugin = require('./plugin.progress')
88
const BootDefaultExport = require('./plugin.boot-default-export')
99
const parseBuildEnv = require('../helpers/parse-build-env')
10+
const getPackagePath = require('../helpers/get-package-path')
1011

1112
const appPaths = require('../app-paths')
1213
const injectStyleRules = require('./inject.style-rules')
@@ -38,6 +39,13 @@ function getRootDefines (rootDefines, configName) {
3839
return rootDefines
3940
}
4041

42+
const extrasPath = (() => {
43+
const ePath = getPackagePath('@quasar/extras')
44+
return ePath !== void 0
45+
? path.dirname(ePath)
46+
: false
47+
})()
48+
4149
module.exports = function (cfg, configName) {
4250
const chain = new WebpackChain()
4351

@@ -91,6 +99,11 @@ module.exports = function (cfg, configName) {
9199
'src-bex': appPaths.bexDir // needed for app/templates
92100
})
93101

102+
if (extrasPath) {
103+
// required so quasar/icon-sets/* with imports to work correctly
104+
chain.resolve.alias.merge({ '@quasar/extras': extrasPath })
105+
}
106+
94107
const vueFile = configName === webpackNames.ssr.serverSide
95108
? (cfg.ctx.prod ? 'vue.cjs.prod.js' : 'vue.cjs.js')
96109
: (

extras/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// empty file
2+
// to help q/app-webpack discover where this package is installed

0 commit comments

Comments
 (0)