File tree Expand file tree Collapse file tree
packages/plugins/resource Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2023 - present TinyEngine Authors.
3+ * Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
4+ *
5+ * Use of this source code is governed by an MIT-style license.
6+ *
7+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10+ *
11+ */
12+
13+ import { defineConfig } from 'vite'
14+ import path from 'path'
15+ import vue from '@vitejs/plugin-vue'
16+ import vueJsx from '@vitejs/plugin-vue-jsx'
17+ import generateComment from '@opentiny/tiny-engine-vite-plugin-meta-comments'
18+
19+ // https://vitejs.dev/config/
20+ export default defineConfig ( {
21+ plugins : [ generateComment ( ) , vue ( ) , vueJsx ( ) ] ,
22+ publicDir : false ,
23+ resolve : { } ,
24+ build : {
25+ sourcemap : true ,
26+ lib : {
27+ entry : path . resolve ( __dirname , './index.ts' ) ,
28+ name : 'plugin-resource' ,
29+ fileName : ( _format , entryName ) => `${ entryName } .js` ,
30+ formats : [ 'es' ]
31+ } ,
32+ rollupOptions : {
33+ output : {
34+ banner : 'import "./style.css"'
35+ } ,
36+ external : [ 'vue' , / @ o p e n t i n y \/ t i n y - e n g i n e .* / , / @ o p e n t i n y \/ v u e .* / ]
37+ }
38+ }
39+ } )
You can’t perform that action at this time.
0 commit comments