build: fix component version error (#3528)
This commit is contained in:
parent
40e69c46e1
commit
3aed708b89
|
@ -259,7 +259,7 @@ export const getBaseConfig = ({ vueVersion, dtsInclude, dts, buildTarget, isRunt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
!isRuntime && replaceModuleNamePlugin(versionTarget)
|
!isRuntime && replaceModuleNamePlugin(() => versionTarget)
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.js', '.ts', '.tsx', '.vue'],
|
extensions: ['.js', '.ts', '.tsx', '.vue'],
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import type { Plugin, NormalizedOutputOptions, OutputBundle } from 'rollup'
|
import type { Plugin, NormalizedOutputOptions, OutputBundle } from 'rollup'
|
||||||
|
|
||||||
export default function (version: string): Plugin {
|
export default function (getVersion: () => string): Plugin {
|
||||||
|
const version = getVersion()
|
||||||
return {
|
return {
|
||||||
name: 'opentiny-vue:replace-module-name',
|
name: 'opentiny-vue:replace-module-name',
|
||||||
generateBundle: (output: NormalizedOutputOptions, bundle: OutputBundle) => {
|
generateBundle: (output: NormalizedOutputOptions, bundle: OutputBundle) => {
|
||||||
|
|
Loading…
Reference in New Issue