提交 ed95b31c 编写于 作者: fxy060608's avatar fxy060608

chore: update checkVersion.js

......@@ -22,6 +22,7 @@ import { transformVideo } from './transforms/transformVideo'
import { transformText } from './transforms/transformText'
import { createConfigResolved } from '../../plugin/configResolved'
import { defaultNVueRpx2Unit } from '@dcloudio/uni-shared'
import { external, globals } from '../utils'
const uTags = {
text: 'u-text',
......@@ -68,6 +69,7 @@ export function uniAppNVuePlugin(): Plugin {
build: {
outDir: nvueOutDir(),
rollupOptions: {
external,
input: {
main: mainPath,
},
......@@ -82,6 +84,7 @@ export function uniAppNVuePlugin(): Plugin {
assetFileNames: '[name][extname]',
chunkFileNames: createChunkFileNames(inputDir),
plugins: [dynamicImportPolyfill()],
globals,
},
},
},
......
......@@ -8,6 +8,7 @@ import debug from 'debug'
import { transformWithEsbuild } from '@dcloudio/uni-cli-shared'
import { nvueOutDir } from '../../utils'
import { esbuildGlobals } from '../utils'
const debugEsbuild = debug('uni:app-nvue-esbuild')
......@@ -26,7 +27,7 @@ export function uniEsbuildPlugin(): Plugin {
},
bundle: true,
write: false,
plugins: [esbuildGlobalPlugin({ vue: 'Vue' })],
plugins: [esbuildGlobalPlugin(esbuildGlobals)],
}
},
async writeBundle(_, bundle) {
......
export const external = ['vue', 'vuex']
export const globals = {
vue: 'Vue',
vuex: 'Vuex',
}
export const esbuildGlobals = {
vue: 'Vue',
vuex: 'Vue.Vuex',
}
......@@ -33,7 +33,6 @@ export function buildOptions(
emptyOutDir: false, // 不清空输出目录,否则会影响 webpack 的输出
assetsInlineLimit: 0,
rollupOptions: {
external: ['vue'],
input: resolveMainPathOnce(inputDir),
output: {
sourcemapPathTransform(relativeSourcePath, sourcemapPath) {
......@@ -59,9 +58,6 @@ export function buildOptions(
return '[name].js'
},
assetFileNames: '[name][extname]',
globals: {
vue: 'Vue',
},
},
},
}
......
......@@ -39,6 +39,7 @@ export function uniAppVuePlugin(): UniVitePlugin {
},
build: {
rollupOptions: {
external: ['vue'],
output: {
name: 'AppService',
format: process.env.UNI_APP_CODE_SPLITING ? 'amd' : 'iife',
......@@ -46,6 +47,9 @@ export function uniAppVuePlugin(): UniVitePlugin {
autoId: true,
},
entryFileNames: APP_SERVICE_FILENAME,
globals: {
vue: 'Vue',
},
},
},
},
......
......@@ -388,7 +388,6 @@ function useMovableViewState(
}
}
function __handleTouchMove(event: TouchtrackEvent) {
event.stopPropagation()
if (!_isScaling && !props.disabled && _isTouching) {
let x = _translateX
let y = _translateY
......
......@@ -13,10 +13,10 @@ const pkgs = {
latest: '3.2.30',
},
'vue-router': {
next: '4.0.12',
latest: '4.0.12',
},
vuex: {
next: '4.0.2',
latest: '4.0.2',
},
'vue-i18n': {
next: '9.1.9',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册