fix(webapp): always link compiled styleguide (#8998)

This commit is contained in:
Ulf Gebhardt 2025-10-31 16:36:51 +01:00 committed by GitHub
parent 1c7f2f27b5
commit 2130aa0d68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 5 deletions

View File

@ -15,7 +15,7 @@
"*"
],
"@@/*": [
"../styleguide/src/system/*"
"../styleguide/dist/system.umd.min.js"
],
}
}

View File

@ -6,8 +6,9 @@ const CONFIG = require('./config').default // we need to use require since this
const styleguidePath = '../styleguide'
const styleguideStyles = [
`${styleguidePath}/src/system/styles/main.scss`,
`${styleguidePath}/src/system/styles/shared.scss`,
// `${styleguidePath}/src/system/styles/main.scss`,
// `${styleguidePath}/src/system/styles/shared.scss`,
`${styleguidePath}/dist/shared.scss`,
]
export default {
@ -256,6 +257,11 @@ export default {
: `[contenthash:7]${isModern ? '.modern' : ''}_${CONFIG.VERSION}.js`,
css: ({ isDev }) => (isDev ? '[name].css' : `css/[contenthash:7]_${CONFIG.VERSION}.css`),
},
// babel config
babel: {
// To prevent ERROR [BABEL] Note: The code generator has deoptimised the styling of [..] as it exceeds the max of 500KB.
compact: true,
},
/*
** You can extend webpack config here
*/
@ -272,7 +278,7 @@ export default {
config.devtool = 'source-map'
}
config.resolve.alias['@@'] = path.resolve(__dirname, `${styleguidePath}/src/system`)
config.resolve.alias['@@'] = path.resolve(__dirname, `${styleguidePath}/dist`)
config.module.rules.push({
resourceQuery: /blockType=docs/,
loader: require.resolve(`${styleguidePath}/src/loader/docs-trim-loader.js`),

View File

@ -1,4 +1,5 @@
import Vue from 'vue'
import Styleguide from '@@/'
import Styleguide from '@@/system.umd.min.js'
import '@@/system.css'
Vue.use(Styleguide)