설치
yarn add vue3-quill
JavaScript
복사
vite.config.js
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
optimizeDeps: {
include: ['quill']
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
css: {
preprocessorOptions: {
scss: {
additionalData: `
@import "./src/assets/scss/_common.scss";
`
}
}
}
})
// optimizeDeps에 추가해주었다
JavaScript
복사
main.js
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import {
faMagnifyingGlass,
faCircleChevronLeft,
faCircleChevronRight,
faPaperPlane,
fas
} from '@fortawesome/free-solid-svg-icons'
import { faCalendarCheck, faUser, far } from '@fortawesome/free-regular-svg-icons'
import { quillEditor } from 'vue3-quill'
import App from './App.vue'
import router from './router'
library.add(faMagnifyingGlass, faCircleChevronLeft, faCircleChevronRight, faPaperPlane)
library.add(faCalendarCheck, faUser, fas, far)
const app = createApp(App)
app.component('font-awesome-icon', FontAwesomeIcon)
app.use(quillEditor)
app.use(createPinia())
app.use(router)
app.mount('#app')
//import 후 use에 넣어주기
JavaScript
복사
참고자료
quill editor에서 받은 사진을 formData로 서버에 보내기