2022-02-21 14:07:07 +00:00
|
|
|
// vite.config.js
|
|
|
|
|
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import { createVuePlugin as vue } from "vite-plugin-vue2";
|
|
|
|
|
2022-02-21 22:16:48 +00:00
|
|
|
import path from 'path'
|
2022-02-21 14:07:07 +00:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-02-21 22:16:48 +00:00
|
|
|
plugins: [
|
|
|
|
vue(),
|
|
|
|
{
|
|
|
|
name: 'fix-django-channels',
|
|
|
|
transform (src, id) {
|
|
|
|
if (id.includes('django-channels')) {
|
|
|
|
return `var parcelRequire;${src}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2022-02-21 14:07:07 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|