mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-30 11:16:12 +08:00
fix: fix full bundle export (#1350)
* fix: fix full bundle export * chore: update
This commit is contained in:
parent
ed1871fe28
commit
fbf5267de6
@ -19,7 +19,9 @@ const plugins = [
|
||||
new VueLoaderPlugin(),
|
||||
// new BundleAnalyzerPlugin(),
|
||||
]
|
||||
let entry = [path.resolve(__dirname, '../packages/element-plus/index.ts')]
|
||||
|
||||
const entry = path.resolve(__dirname, '../packages/element-plus/index.ts')
|
||||
|
||||
if (!isFullMode) {
|
||||
externals.push({
|
||||
'@popperjs/core': '@popperjs/core',
|
||||
@ -30,8 +32,6 @@ if (!isFullMode) {
|
||||
},
|
||||
/^dayjs.*/,
|
||||
/^lodash.*/)
|
||||
} else {
|
||||
entry.push(path.resolve(__dirname, '../packages/element-plus/full.ts'))
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -1,4 +0,0 @@
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
// expose Day.js to window to make full bundle i18n work
|
||||
(window as any).dayjs = dayjs
|
@ -95,6 +95,13 @@ import { use, i18n } from '@element-plus/locale'
|
||||
import { version as version_ } from './version'
|
||||
import type { InstallOptions } from '@element-plus/utils/config'
|
||||
import { setConfig } from '@element-plus/utils/config'
|
||||
import isServer from '@element-plus/utils/isServer'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
// expose Day.js to window to make full bundle i18n work
|
||||
if (!isServer && !(window as any).dayjs) {
|
||||
(window as any).dayjs = dayjs
|
||||
}
|
||||
|
||||
const version = version_ // version_ to fix tsc issue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user