diaseu 4 лет назад
Родитель
Сommit
60b6164a82

+ 1
- 2
backend/db/data-generator/classes.js Просмотреть файл

3
         this.user_id = id
3
         this.user_id = id
4
         this.user_name = ''
4
         this.user_name = ''
5
         this.user_email = ''
5
         this.user_email = ''
6
-        // TODO: user_media
7
-        // this.user_media = ''
8
         this.is_admin = false
6
         this.is_admin = false
9
         this.is_poster = false
7
         this.is_poster = false
10
     }
8
     }
13
     constructor(id, override) {
11
     constructor(id, override) {
14
         this.user_id = override?.user_id ? override.user_id : id
12
         this.user_id = override?.user_id ? override.user_id : id
15
         this.profile_id = override?.profile_id ? override.profile_id + id : id
13
         this.profile_id = override?.profile_id ? override.profile_id + id : id
14
+        this.user_media = ''
16
     }
15
     }
17
 }
16
 }
18
 class Response {
17
 class Response {

+ 4
- 4
backend/db/data-generator/config.js Просмотреть файл

1
-const mockOutputPath = './db/generated/_batch'
1
+const mockOutputPath = './db/generated'
2
 const magic = 1000
2
 const magic = 1000
3
 
3
 
4
 // Insert here how many users you would like to generate:
4
 // Insert here how many users you would like to generate:
5
-const total = 100
6
-const batchSize = 20
5
+const total = 30
6
+const batchSize = 10
7
 
7
 
8
 // Amount of responses for a complete survey
8
 // Amount of responses for a complete survey
9
-const questions = 13
9
+const questions = 7
10
 
10
 
11
 // Seekers per 100 profiles
11
 // Seekers per 100 profiles
12
 const percentageOfSeekers = 90
12
 const percentageOfSeekers = 90

+ 37
- 87
backend/db/data-generator/index.js Просмотреть файл

5
 const score = require('./score')
5
 const score = require('./score')
6
 
6
 
7
 let batchCount = 1 // Counter to track how many things we've generated
7
 let batchCount = 1 // Counter to track how many things we've generated
8
-let extraProfilesToGenerate = 0
8
+let extraProfilesToGenerate = 1
9
 let extraProfileCount = 0 // Counter to track how many EXTRA profiles we've generated
9
 let extraProfileCount = 0 // Counter to track how many EXTRA profiles we've generated
10
 let generatedResponseCount = 0 // Counter to track every response generated
10
 let generatedResponseCount = 0 // Counter to track every response generated
11
 
11
 
27
  * Our initial file setup
27
  * Our initial file setup
28
  */
28
  */
29
 const write = async (batchNum, outputDataObject) => {
29
 const write = async (batchNum, outputDataObject) => {
30
-    await fs.writeFile(`${config.mockOutputPath}_${batchNum}.js`, '', () => {})
30
+    const filename = `_batch_${batchNum}.js`
31
+    await fs.writeFile(`${config.mockOutputPath}/${filename}`, '', () => {})
31
     fs.appendFile(
32
     fs.appendFile(
32
-        `${config.mockOutputPath}_${batchNum}.js`,
33
-        config.header + 'module.exports = ' + JSON.stringify(outputDataObject),
33
+        `${config.mockOutputPath}/${filename}`,
34
+        config.header +
35
+            'module.exports = ' +
36
+            JSON.stringify(outputDataObject, null, '  '),
34
         err => {
37
         err => {
35
             if (err) {
38
             if (err) {
36
                 console.error(err)
39
                 console.error(err)
67
         }
70
         }
68
         user.user_name = random.name() + ' ' + random.name()
71
         user.user_name = random.name() + ' ' + random.name()
69
         user.user_email = random.email()
72
         user.user_email = random.email()
70
-
71
-        var mediaArray = []
72
-        for (let i=0; i < 3; i++) {
73
-            mediaArray.push(random.media())
74
-        }
75
-        // TODO: make this a table
76
-        // user.user_media = mediaArray
77
     })
73
     })
78
     console.log('COMPLETED: Generated Users...')
74
     console.log('COMPLETED: Generated Users...')
79
     return users
75
     return users
87
         starting: config.batchSize * batchCount,
83
         starting: config.batchSize * batchCount,
88
         profile_id: extraProfileCount,
84
         profile_id: extraProfileCount,
89
     })
85
     })
86
+    profiles.forEach(profile => {
87
+        var mediaArray = []
88
+        for (let i = 0; i < 3; i++) {
89
+            mediaArray.push(random.media())
90
+        }
91
+        profile.user_media = mediaArray
92
+    })
90
     // Generate extra job posting profiles
93
     // Generate extra job posting profiles
91
     // attributed to random user.is_poster === true
94
     // attributed to random user.is_poster === true
92
     // TODO: Clean this up. Hard to read...
95
     // TODO: Clean this up. Hard to read...
104
             extras = [...extras, ...generatedExtraProfiles]
107
             extras = [...extras, ...generatedExtraProfiles]
105
         }
108
         }
106
         extras.forEach(profile => {
109
         extras.forEach(profile => {
110
+            var mediaArray = []
111
+            for (let i = 0; i < 3; i++) {
112
+                mediaArray.push(random.media())
113
+            }
114
+            profile.user_media = mediaArray
107
             profiles.push(profile)
115
             profiles.push(profile)
108
             extraProfileCount++
116
             extraProfileCount++
109
         })
117
         })
142
 /**
150
 /**
143
  * Our main generator loop
151
  * Our main generator loop
144
  */
152
  */
153
+const writeBarrel = async () => {
154
+    await fs.writeFile(`${config.mockOutputPath}/index.js`, '', () => {})
155
+}
156
+// writeBarrel()
157
+
145
 for (
158
 for (
146
     let batch = config.batchSize;
159
     let batch = config.batchSize;
147
     batch <= config.total;
160
     batch <= config.total;
164
     const responses = generateResponses(profiles)
177
     const responses = generateResponses(profiles)
165
 
178
 
166
     write(config.batchSize * batchCount, { users, profiles, responses })
179
     write(config.batchSize * batchCount, { users, profiles, responses })
180
+
181
+    /**
182
+     * Write barrel export
183
+     */
184
+    // const filename = `_batch_${config.batchSize * batchCount}.js`
185
+    // fs.appendFile(
186
+    //     `${config.mockOutputPath}/index.js`,
187
+    //     `export * from './${filename}'\n`,
188
+    //     err => {
189
+    //         if (err) console.error(err)
190
+    //     },
191
+    // )
192
+
167
     batchCount++
193
     batchCount++
168
 }
194
 }
169
 
195
 
170
-/**
171
- * Score all the profiles!
172
- */
173
-// const compareProfileResponses = (seeker, potentialMatch) => {
174
-//     const checkValCb = res => {
175
-//         const val = parseInt(res.val)
176
-//         return isNaN(val) ? 0 : val
177
-//     }
178
-//     const filterBy = idToCheckFor => {
179
-//         return responses
180
-//             .filter(
181
-//                 response =>
182
-//                     response.profile_id == idToCheckFor &&
183
-//                     response.val.length < 4,
184
-//             )
185
-//             .map(checkValCb)
186
-//     }
187
-//     const seekerResponses = filterBy(seeker.profile_id)
188
-//     const potentialMatchResponses = filterBy(potentialMatch.profile_id)
189
-//     const cachedScores = []
190
-//     seekerResponses.forEach(seekerResponse => {
191
-//         potentialMatchResponses.forEach(potentialResponse => {
192
-//             cachedScores.push(
193
-//                 preComputedScores[seekerResponse][potentialResponse],
194
-//             )
195
-//         })
196
-//     })
197
-//     return Math.round(
198
-//         cachedScores.reduce((a, b) => a + b) / cachedScores.length,
199
-//     )
200
-// }
201
-// const scoreProfile = (profile, potentialMatchList) => {
202
-//     return potentialMatchList
203
-//         .map(profileToCompare => {
204
-//             return {
205
-//                 match_queue_id: null,
206
-//                 profile_id: profile.profile_id,
207
-//                 target_id: profileToCompare.profile_id,
208
-//                 is_deleted: false,
209
-//                 score: compareProfileResponses(profile, profileToCompare),
210
-//             }
211
-//         })
212
-//         .sort((a, b) => a.score - b.score)
213
-// }
214
-
215
-// const scoreAll = () => {
216
-//     process.stdout.write('\nScoring Profiles')
217
-//     let scores = []
218
-//     const posterProfiles = profiles.filter(profile =>
219
-//         jobPosterIds.includes(profile.user_id),
220
-//     )
221
-//     const seekerProfiles = profiles.filter(
222
-//         profile => !jobPosterIds.includes(profile.user_id),
223
-//     )
224
-//     process.stdout.write('.')
225
-//     for (let i = 0; i < seekerProfiles.length; i++) {
226
-//         const scored = scoreProfile(seekerProfiles[i], posterProfiles)
227
-//         scores.push(...scored)
228
-//     }
229
-//     process.stdout.write('.')
230
-//     for (let j = 0; j < posterProfiles.length; j++) {
231
-//         const scored = scoreProfile(posterProfiles[j], seekerProfiles)
232
-//         scores.push(...scored)
233
-//     }
234
-//     process.stdout.write('.')
235
-//     console.log('\n\nCOMPLETED: Scoring Profiles...')
236
-//     return scores.reverse()
237
-// }
238
-
239
-// const match_queues = scoreAll().map((score, i) => {
240
-//     score.match_queue_id = i + 1
241
-//     // Comment out  next line to see the scores
242
-//     delete score.score
243
-//     return score
244
-// })
245
-
246
 console.log('---\nFINISHED...\n===\n')
196
 console.log('---\nFINISHED...\n===\n')

+ 43
- 41
backend/db/data-generator/score.js Просмотреть файл

4
 
4
 
5
 const preComputedScores = {
5
 const preComputedScores = {
6
     100: {
6
     100: {
7
-        100: 0,
8
-        140: 0,
9
-        180: 0,
10
-        220: 0,
11
-        260: 0,
12
-        400: 0,
7
+        100: 1000,
8
+        140: 872,
9
+        180: 675,
10
+        220: 518,
11
+        260: 406,
12
+        400: 215,
13
     },
13
     },
14
     140: {
14
     140: {
15
-        100: 0,
16
-        140: 0,
17
-        180: 0,
18
-        220: 0,
19
-        260: 0,
20
-        400: 0,
15
+        100: 872,
16
+        140: 1000,
17
+        180: 938,
18
+        220: 828,
19
+        260: 723,
20
+        400: 486,
21
     },
21
     },
22
     180: {
22
     180: {
23
-        100: 0,
24
-        140: 0,
25
-        180: 0,
26
-        220: 0,
27
-        260: 0,
28
-        400: 0,
23
+        100: 675,
24
+        140: 938,
25
+        180: 1000,
26
+        220: 968,
27
+        260: 906,
28
+        400: 706,
29
     },
29
     },
30
     220: {
30
     220: {
31
-        100: 0,
32
-        140: 0,
33
-        180: 0,
34
-        220: 0,
35
-        260: 0,
36
-        400: 0,
31
+        100: 518,
32
+        140: 828,
33
+        180: 968,
34
+        220: 1000,
35
+        260: 982,
36
+        400: 847,
37
     },
37
     },
38
     260: {
38
     260: {
39
-        100: 0,
40
-        140: 0,
41
-        180: 0,
42
-        220: 0,
43
-        260: 0,
44
-        400: 0,
39
+        100: 406,
40
+        140: 723,
41
+        180: 906,
42
+        220: 982,
43
+        260: 1000,
44
+        400: 928,
45
     },
45
     },
46
     400: {
46
     400: {
47
-        100: 0,
48
-        140: 0,
49
-        180: 0,
50
-        220: 0,
51
-        260: 0,
52
-        400: 0,
47
+        100: 215,
48
+        140: 486,
49
+        180: 706,
50
+        220: 847,
51
+        260: 928,
52
+        400: 1000,
53
     },
53
     },
54
 }
54
 }
55
 const score2d = (a, b) => {
55
 const score2d = (a, b) => {
62
             config.magic,
62
             config.magic,
63
     )
63
     )
64
 }
64
 }
65
-config.scoreVals.forEach(val => {
66
-    config.scoreVals.forEach(v => {
67
-        preComputedScores[val][v] = score2d(val, v)
68
-    })
69
-})
65
+
66
+// Uncomment to rerun precompute
67
+// config.scoreVals.forEach(val => {
68
+//     config.scoreVals.forEach(v => {
69
+//         preComputedScores[val][v] = score2d(val, v)
70
+//     })
71
+// })
70
 
72
 
71
 module.exports = {
73
 module.exports = {
72
     precomputed: preComputedScores,
74
     precomputed: preComputedScores,

+ 0
- 1446
backend/db/mock.js
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 9
- 7
backend/db/survey-generator.js Просмотреть файл

1
 const fs = require('fs')
1
 const fs = require('fs')
2
 const similarity = require('compute-cosine-similarity')
2
 const similarity = require('compute-cosine-similarity')
3
-const magic = 1000 // Multiply cosine similary by this
3
+const config = require('./data-generator/config.js')
4
 
4
 
5
-const not_important = '120'
6
-const somewhat_important = '140'
7
-const important = '160'
8
-const very_important = '180'
9
-const extremely_important = '200'
10
-const mandatory = '400'
5
+const magic = config.magic // Multiply cosine similary by this
6
+
7
+const not_important = config.scoreVals[0]
8
+const somewhat_important = config.scoreVals[1]
9
+const important = config.scoreVals[2]
10
+const very_important = config.scoreVals[3]
11
+const extremely_important = config.scoreVals[4]
12
+const mandatory = config.scoreVals[5]
11
 
13
 
12
 // -
14
 // -
13
 // 1440 - 2400 total range
15
 // 1440 - 2400 total range

+ 5496
- 8
frontend/package-lock.json
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 1
- 0
frontend/package.json Просмотреть файл

30
         "pug-plain-loader": "^1.1.0",
30
         "pug-plain-loader": "^1.1.0",
31
         "sugarss": "^3.0.3",
31
         "sugarss": "^3.0.3",
32
         "vite": "^2.2.3",
32
         "vite": "^2.2.3",
33
+        "vite-fs": "^0.0.2",
33
         "watch": "^1.0.2"
34
         "watch": "^1.0.2"
34
     }
35
     }
35
 }
36
 }

+ 0
- 6
frontend/src/App.vue Просмотреть файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-
3
-
4
 router-view
2
 router-view
5
-
6
 </template>
3
 </template>
7
 
4
 
8
 <script>
5
 <script>
9
 import * as sss from '@/sss/import.css'
6
 import * as sss from '@/sss/import.css'
10
 
7
 
11
-
12
-
13
 export default {
8
 export default {
14
     name: 'app',
9
     name: 'app',
15
 }
10
 }
38
             height: 100%
33
             height: 100%
39
             width: 100%
34
             width: 100%
40
             flex-direction: column
35
             flex-direction: column
41
-
42
 </style>
36
 </style>

+ 16
- 31
frontend/src/components/ProfileCardList.vue Просмотреть файл

3
     .profile_card_list_container.w-full
3
     .profile_card_list_container.w-full
4
         .swipe(
4
         .swipe(
5
             :config='config'
5
             :config='config'
6
-            :key='profile.profile_id'
6
+            :key='profile.uid'
7
             @throwout='swipped(profile)'
7
             @throwout='swipped(profile)'
8
             v-for='profile in profiles'
8
             v-for='profile in profiles'
9
-            :style='{ "left": `vh` }'
10
         )
9
         )
11
             .card.b-solid.rounded.p-0.bg-cover(
10
             .card.b-solid.rounded.p-0.bg-cover(
12
-                :style='{ "background-image": `url(${profile.user.user_media})` }'
13
-                
11
+                :style='{ "background-image": `url(${profile.avatar})` }'
14
             )
12
             )
15
                 .card__content
13
                 .card__content
16
-                    h3.p-1.mv-0.b-solid.rounded {{ profile.user.user_name }}
14
+                    h3.p-1.mv-0.b-solid.rounded {{ profile.name }}
17
 
15
 
16
+        nav.swipe_icons.w-full.f-row.between
17
+            h2 A
18
+            h2 H
19
+            h2 P
18
 </template>
20
 </template>
19
 
21
 
20
 <script>
22
 <script>
34
         },
36
         },
35
         uid: {
37
         uid: {
36
             type: Number,
38
             type: Number,
37
-            default: 1,
39
+            default: 9999,
38
         },
40
         },
39
     },
41
     },
40
     data: () => ({
42
     data: () => ({
52
         },
54
         },
53
     },
55
     },
54
     created() {
56
     created() {
55
-        this.getProfile()
57
+        this.getUser()
56
     },
58
     },
57
     methods: {
59
     methods: {
58
         logOut() {},
60
         logOut() {},
65
             profile.id = Date.now() + (Math.random() * 100000).toFixed()
67
             profile.id = Date.now() + (Math.random() * 100000).toFixed()
66
             this.profiles.unshift({ ...profile })
68
             this.profiles.unshift({ ...profile })
67
         },
69
         },
68
-        getProfile() {
70
+        getUser() {
69
             return
71
             return
70
         },
72
         },
71
         onRequest() {
73
         onRequest() {
76
 }
78
 }
77
 </script>
79
 </script>
78
 <style lang="postcss">
80
 <style lang="postcss">
79
-@import '../sss/card.scss'
80
-
81
-.profile_card_list
81
+.profile_card_list_container
82
     display: flex
82
     display: flex
83
     justify-content: center
83
     justify-content: center
84
     margin: 5vh 0 0 0
84
     margin: 5vh 0 0 0
85
-    position: relative
86
-
87
-
88
-.profile_card_list_container
89
-    margin: 0 auto
90
-    width: 30%
91
-    position: relative
92
-    .swipe
93
-        list-style: none
94
-        background: #fff
95
-        box-shadow: 0 0 2px rgba(0,0,0,.2), 1px 1px 1px rgba(0,0,0,.2)
96
-        position: absolute
97
-        line-height: 300px
98
-        text-align: center
99
-        border: 1px solid #ECECEC
100
-        border-radius: 8px
101
-        
102
 
85
 
103
 .swipe
86
 .swipe
104
-    
87
+    position: absolute
105
 
88
 
106
 .card
89
 .card
107
     position: relative
90
     position: relative
110
     max-width: 85vw
93
     max-width: 85vw
111
     height: 50vh
94
     height: 50vh
112
     background-position: center
95
     background-position: center
113
-    border: 1px solid #fff
114
     &_content
96
     &_content
115
         width: 100%
97
         width: 100%
116
         height: 100%
98
         height: 100%
117
     h3
99
     h3
118
         position: absolute
100
         position: absolute
119
         bottom: 0
101
         bottom: 0
120
-        color: #fff
121
 
102
 
103
+.swipe_icons
104
+    position: fixed
105
+    bottom: 5vh
106
+    width: 250px
122
 </style>
107
 </style>

+ 1
- 1
frontend/src/router/index.js Просмотреть файл

11
     {
11
     {
12
         path: '/',
12
         path: '/',
13
         component: home,
13
         component: home,
14
-        name: 'home',
14
+        name: 'HomeView',
15
         meta: { requiresAuth: true, requiresProfile: true },
15
         meta: { requiresAuth: true, requiresProfile: true },
16
     },
16
     },
17
     {
17
     {

+ 41
- 47
frontend/src/views/home.vue Просмотреть файл

2
 sidebar
2
 sidebar
3
 main.f-col.start.w-full
3
 main.f-col.start.w-full
4
     article#home
4
     article#home
5
-        h1(v-if="user") {{ user.user_name }}
6
-        profile-card-list(:uid='mypid' :profiles='swipables')
5
+        h1(v-if='user') {{ user.user_name }}
6
+        profile-card-list(:profiles='swipables' :uid='mypid')
7
     main-nav
7
     main-nav
8
 </template>
8
 </template>
9
 
9
 
11
 import sidebar from '../components/Sidebar.vue'
11
 import sidebar from '../components/Sidebar.vue'
12
 import mainNav from '../components/MainNav.vue'
12
 import mainNav from '../components/MainNav.vue'
13
 import profileCardList from '../components/ProfileCardList.vue'
13
 import profileCardList from '../components/ProfileCardList.vue'
14
-import batch20 from '../../../backend/db/generated/_batch_20.js'
14
+
15
+import batch_10 from '../../../backend/db/generated/_batch_10.js.ref'
16
+import batch_20 from '../../../backend/db/generated/_batch_20.js.ref'
17
+import batch_30 from '../../../backend/db/generated/_batch_30.js.ref'
15
 
18
 
16
 export default {
19
 export default {
17
     name: 'HomeView',
20
     name: 'HomeView',
18
     components: { profileCardList, sidebar, mainNav },
21
     components: { profileCardList, sidebar, mainNav },
19
     data: () => ({
22
     data: () => ({
20
-        swipables: [   
21
-            // { 
22
-            //     user_id: 1, 
23
-            //     user: {
24
-            //         user_id: 20,
25
-            //         user_name: 'wravu pdjak',
26
-            //         user_email: '3vypx3qyj@aol.com',
27
-            //         is_admin: false,
28
-            //         is_poster: 1,
29
-            //     }, 
30
-            //     profile_id: 1 
31
-            // },
32
-        ],
23
+        swipables: [],
33
         user: null,
24
         user: null,
34
         mypid: null,
25
         mypid: null,
35
     }),
26
     }),
36
     created() {
27
     created() {
37
         // this.mypid = auth.currentUser?.mypid || "99999";
28
         // this.mypid = auth.currentUser?.mypid || "99999";
38
         this.mypid = 21
29
         this.mypid = 21
39
-        this.getBatch()
40
-        const myProfile = this.getProfilesfor(this.mypid)
41
-        this.user = this.getUserfromProfile(myProfile)
42
-        console.log('this.user', this.user)
30
+        this.processProfiles()
43
     },
31
     },
44
     methods: {
32
     methods: {
45
-        getBatch() {
46
-            const profiles = batch20.profiles
47
-            // .map is more readable
48
-            this.swipables = profiles.map((profile) => {
49
-                profile.user = this.getUserfromProfile(profile)
50
-                return profile
33
+        parseBatch(allBatches) {
34
+            const finished = { profiles: [], users: [], responses: [] }
35
+            allBatches.forEach(batch => {
36
+                const split = batch.value.split('\n')
37
+                split.splice(0, 5)
38
+                split.unshift('{')
39
+                const p = JSON.parse(split.join(''))
40
+                finished.profiles = [...p.profiles, ...finished.profiles]
41
+                finished.users = [...p.users, ...finished.users]
42
+                finished.responses = [...p.responses, ...finished.responses]
51
             })
43
             })
52
-            // for loop is faster
53
-            // const myList = []
54
-            // for (let profile in profiles) {
55
-            //     profile.user = this.getUserfromProfile(profile)
56
-            //     myList.push(profile)
57
-            // }
58
-            // this.swipables = myList
59
-            // before you store in 31, save user info per profile
44
+            return finished
60
         },
45
         },
61
-        getProfilesfor(pid) {
62
-            const profilesfromBatch = batch20.profiles
63
-            const profiles = profilesfromBatch.filter((profile) => {
64
-                return profile.profile_id === pid
46
+        processProfiles() {
47
+            const parsed = this.parseBatch([batch_10, batch_20, batch_30])
48
+            const findUser = profile => {
49
+                return parsed.users.filter(u => u.user_id == profile.user_id)[0]
50
+            }
51
+            parsed.profiles.forEach(p => {
52
+                // console.log(parsed)
53
+                const user = findUser(p)
54
+                p.uid = p.profile_id
55
+                p.name = user.user_name
56
+                p.email = user.user_email
57
+                p.avatar = p.user_media[0]
58
+                p.responses = parsed.responses.filter(
59
+                    r => r.profile_id == p.profile_id,
60
+                )
61
+                p.responses.forEach(r => {
62
+                    if (r.response_key_id == 7) {
63
+                        p.zipcode = r.val
64
+                    }
65
+                })
66
+                this.swipables.push(p)
65
             })
67
             })
66
-            return profiles[0]
68
+            console.log(this.swipables)
67
         },
69
         },
68
-        getUserfromProfile(profile) {
69
-            const users = batch20.users
70
-            const usersProfile = users.filter((user) => {
71
-                return user.user_id === profile.user_id
72
-            })
73
-            return usersProfile[0]
74
-        }
75
-
76
     },
70
     },
77
 }
71
 }
78
 </script>
72
 </script>

+ 2
- 2
frontend/vite.config.js Просмотреть файл

1
 import { defineConfig } from 'vite'
1
 import { defineConfig } from 'vite'
2
 import vue from '@vitejs/plugin-vue'
2
 import vue from '@vitejs/plugin-vue'
3
-
3
+import ViteFS from 'vite-fs'
4
 // https://vitejs.dev/config/
4
 // https://vitejs.dev/config/
5
 export default defineConfig({
5
 export default defineConfig({
6
-    plugins: [vue()],
6
+    plugins: [vue(), ViteFS()],
7
     resolve: {
7
     resolve: {
8
         alias: {
8
         alias: {
9
             '@': require('path').resolve(__dirname, 'src'),
9
             '@': require('path').resolve(__dirname, 'src'),

Загрузка…
Отмена
Сохранить