chore: 更新版本号至1.0.4,优化Vite构建配置,禁用最小化以避免命名冲突

This commit is contained in:
zhanghao 2026-09-10 11:01:55 +08:00
parent 7136751cd1
commit df522fb87c
3 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@cmvr/iot-common", "name": "@cmvr/iot-common",
"version": "1.0.2", "version": "1.0.4",
"description": "CMVR IoT shared frontend runtime and business modules", "description": "CMVR IoT shared frontend runtime and business modules",
"author": { "author": {
"name": "zhanghao", "name": "zhanghao",

View File

@ -120,11 +120,10 @@
</template> </template>
<script setup> <script setup>
import { computed, ref, reactive, watch, nextTick } from 'vue' import { computed, ref, reactive, watch } from 'vue'
import { Plus, Minus } from '@element-plus/icons-vue' import { Plus, Minus } from '@element-plus/icons-vue'
import FormItemRecursive from '../FormItemRecursive.vue' import FormItemRecursive from '../FormItemRecursive.vue'
import RobotExecutionTarget from './RobotExecutionTarget.vue' import RobotExecutionTarget from './RobotExecutionTarget.vue'
import { getInput } from '@/utils/flow'
import { useQuote } from './useQuote.js' import { useQuote } from './useQuote.js'
import { getArmStatus, getArmJointState, getAgvStatus, getAgvStations } from '@/api/flow/flow' import { getArmStatus, getArmJointState, getAgvStatus, getAgvStations } from '@/api/flow/flow'
import { getRobotList, getRobotDevicesByRobotId } from '@/api/resource/robot' import { getRobotList, getRobotDevicesByRobotId } from '@/api/resource/robot'

View File

@ -51,6 +51,10 @@ export default defineConfig({
}, },
build: { build: {
target: 'es2022', target: 'es2022',
// Keep published ESM chunks readable and safe for consumer Rollup builds.
// Consumers may bundle these chunks again; minifying here can cause short
// binding names to collide during that second pass.
minify: false,
sourcemap: true, sourcemap: true,
cssCodeSplit: false, cssCodeSplit: false,
lib: { lib: {
@ -62,6 +66,10 @@ export default defineConfig({
rollupOptions: { rollupOptions: {
external: (id) => externalDependencies.some((dependency) => id === dependency || id.startsWith(`${dependency}/`)), external: (id) => externalDependencies.some((dependency) => id === dependency || id.startsWith(`${dependency}/`)),
output: { output: {
// Publish one self-contained ESM entry. Consumer Vite/Rollup builds
// otherwise merge the pre-generated chunks and can collide on the
// minified bindings used by different Vue SFC chunks.
inlineDynamicImports: true,
globals: { globals: {
vue: 'Vue', vue: 'Vue',
'vue-router': 'VueRouter' 'vue-router': 'VueRouter'