@qtoggle/qui 1.19.7 → 1.19.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/less/icon-label-view.less +1 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/webpack/webpack-common.js +24 -4
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
const crypto = require('crypto')
|
|
3
|
+
const fs = require('fs')
|
|
3
4
|
const glob = require('glob')
|
|
4
5
|
const path = require('path')
|
|
5
6
|
const webpack = require('webpack')
|
|
@@ -34,6 +35,14 @@ const FONT_REGEX = new RegExp(`${FONT_DIR}/.*\\.(woff)$`)
|
|
|
34
35
|
const TMPL_REGEX = new RegExp(`${TMPL_DIR}/.*\\.(html|json|js)$`)
|
|
35
36
|
|
|
36
37
|
|
|
38
|
+
function readLessImports(lessPath) {
|
|
39
|
+
return fs.readFileSync(lessPath, 'utf8')
|
|
40
|
+
.split('\n')
|
|
41
|
+
.map(line => line.match(/^@import\s+"([^"]+)"/))
|
|
42
|
+
.filter(Boolean)
|
|
43
|
+
.map(m => m[1])
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
function escapeForLess(s) {
|
|
38
47
|
return `~"${s}"`
|
|
39
48
|
}
|
|
@@ -231,10 +240,21 @@ function makeConfig({theme, isProduction, appName, appFullPath, extraAliases, cs
|
|
|
231
240
|
let distFullPath = isProduction ? path.resolve(appFullPath, DIST_DIR) : appFullPath
|
|
232
241
|
|
|
233
242
|
let excludeLessRegex = new RegExp('theme-(' + THEMES.join('|') + ')\\.less', 'i')
|
|
234
|
-
let cssRequirements
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
243
|
+
let cssRequirements
|
|
244
|
+
if (isProduction) {
|
|
245
|
+
cssRequirements = [
|
|
246
|
+
quiLessPath + '/all.less',
|
|
247
|
+
appLessPath + '/all.less'
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
/* In dev mode, enumerate individual LESS files so that file-loader emits a separate CSS file
|
|
252
|
+
* per module, matching what the templates expect in debug mode */
|
|
253
|
+
cssRequirements = [
|
|
254
|
+
...readLessImports(quiLessPath + '/all.less').map(rel => path.resolve(quiLessPath, rel)),
|
|
255
|
+
...readLessImports(appLessPath + '/all.less').map(rel => path.resolve(appLessPath, rel))
|
|
256
|
+
]
|
|
257
|
+
}
|
|
238
258
|
|
|
239
259
|
/* This is needed because FixStyleOnlyEntriesPlugin() needs resources for theme entries to be different */
|
|
240
260
|
cssRequirements.push(path.resolve(quiLessPath, `theme-${theme}.less`))
|