Use vite to replace webpack

This commit is contained in:
tusooa 2025-02-28 10:52:04 -05:00
commit 25de264abb
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
51 changed files with 1210 additions and 79 deletions

View file

@ -221,12 +221,15 @@ export default {
// ## Components stuff
// Getting existing components
const componentsContext = require.context('src', true, /\.style.js(on)?$/)
const componentKeysAll = componentsContext.keys()
const componentsContext = import.meta.glob(
['/src/**/*.style.js', '/src/**/*.style.json'],
{ eager: true }
)
const componentKeysAll = Object.keys(componentsContext)
const componentsMap = new Map(
componentKeysAll
.map(
key => [key, componentsContext(key).default]
key => [key, componentsContext[key].default]
).filter(([, component]) => !component.virtual && !component.notEditable)
)
exports.componentsMap = componentsMap