workflow(sfc-playground): tweaks and commit links
This commit is contained in:
@@ -2,9 +2,15 @@ import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { defineConfig, Plugin } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import execa from 'execa'
|
||||
|
||||
const commit = execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue(), copyVuePlugin()],
|
||||
define: {
|
||||
__COMMIT__: JSON.stringify(commit)
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['consolidate']
|
||||
}
|
||||
@@ -13,7 +19,7 @@ export default defineConfig({
|
||||
function copyVuePlugin(): Plugin {
|
||||
return {
|
||||
name: 'copy-vue',
|
||||
generateBundle(_opts, bundle) {
|
||||
generateBundle() {
|
||||
const filePath = path.resolve(
|
||||
__dirname,
|
||||
'../vue/dist/vue.runtime.esm-browser.js'
|
||||
|
||||
Reference in New Issue
Block a user