34 lines
849 B
JavaScript
34 lines
849 B
JavaScript
import { defineConfig } from 'vite'
|
|
import Userscript from 'vite-userscript-plugin'
|
|
import { name, version, description } from './package.json'
|
|
import babel from 'vite-plugin-babel'
|
|
|
|
export default defineConfig((config) => {
|
|
return {
|
|
build: {
|
|
target: 'esnext'
|
|
},
|
|
plugins: [
|
|
babel(),
|
|
Userscript({
|
|
entry: 'src/index.js',
|
|
header: {
|
|
name,
|
|
version,
|
|
description,
|
|
match: [
|
|
'*://wplace.live/*'
|
|
]
|
|
},
|
|
server: {
|
|
port: 3000
|
|
}
|
|
})
|
|
],
|
|
css: {
|
|
modules: {
|
|
localsConvention: 'camelCaseOnly'
|
|
}
|
|
}
|
|
}
|
|
})
|