Initial commit, framework/frontend assets setup
This commit is contained in:
commit
9d9858bb37
32 changed files with 4651 additions and 0 deletions
42
vite.config.ts
Normal file
42
vite.config.ts
Normal file
|
@ -0,0 +1,42 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import * as path from 'path';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
root: '.',
|
||||
publicDir: 'public/dist',
|
||||
build: {
|
||||
outDir: 'public/dist',
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
app: path.resolve('resources/scripts/main.ts'),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: 'scripts/[name].js',
|
||||
chunkFileNames: 'scripts/[name].js',
|
||||
assetFileNames: '[ext]/[name].[ext]',
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@styles': path.resolve('resources/styles'),
|
||||
'@scripts': path.resolve('resources/scripts'),
|
||||
'@app': path.resolve('resources/scripts/app')
|
||||
},
|
||||
},
|
||||
css: {
|
||||
postcss: './postcss.config.cjs'
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/': {
|
||||
target: 'http://bit.test',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/$/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue