Commit 121337cd by 胡悦

修复打包问题

1 parent fe215cc7
// //
const modulesFiles = import.meta.globEager('./modules/*.ts')
console.log(modulesFiles)
const modules: any = {}
for (const key in modulesFiles) {
if (Object.prototype.hasOwnProperty.call(modulesFiles, key)) {
modules[key.replace(/(\.\/modules\/|\.ts)/g, '')] = modulesFiles[key].default
}
}
console.log(modules)
export default modules
\ No newline at end of file \ No newline at end of file
// const modulesFiles = import.meta.globEager('./modules/*.ts')
// console.log(modulesFiles)
// const modules: any = {}
// for (const key in modulesFiles) {
// if (Object.prototype.hasOwnProperty.call(modulesFiles, key)) {
// modules[key.replace(/(\.\/modules\/|\.ts)/g, '')] = modulesFiles[key].default
// }
// }
// console.log(modules)
// export default modules
\ No newline at end of file \ No newline at end of file
const fetchConfig = function (isEnv = true) { const fetchConfig = function (isEnv = true) {
return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/integral-config', {}).then(res => res.json()) return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/integral-config', {}).then(res => res.json())
} }
const $mockConfig = fetchConfig() const $mockConfig = await fetchConfig()
export default $mockConfig export default $mockConfig
\ No newline at end of file \ No newline at end of file
...@@ -52,5 +52,8 @@ export default defineConfig({ ...@@ -52,5 +52,8 @@ export default defineConfig({
rewrite: path => path.replace(/^\/api/, '') rewrite: path => path.replace(/^\/api/, '')
} }
} }
},
build: {
target:['edge90','chrome90','firefox90','safari15']
} }
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!