mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-15 02:50:10 +01:00
98cef508a6
* Updated apt-packages source for devcontainer Switched the devcontainer's package source to a different repository to align with updated dependencies and package availability. The previous source from 'rocker-org' is replaced with 'devcontainers-contrib', which may offer more recent or relevant development tools. * Subject: Centralize prettier ignores and refine config Body: Centralized all prettier ignore rules by removing individual `.prettierignore` files in subprojects and updating the root `.prettierignore` to include previously ignored patterns, ensuring consistency across the workspace. Additionally, the prettier configuration was refined by making the file pattern for `.config.js` files consistent and adjusting quote styles for better readability. All lint scripts across the project were updated to respect the centralized ignore path, enhancing maintainability. The consolidation simplifies the process of managing ignore rules as the project scales, ensuring developers can focus on writing code without worrying about divergent formatting standards. These changes also align with introducing comprehensive linting across multiple environments to keep the codebase clean and consistent. This adjustment is a foundational step towards a more streamlined and unified code base, making it easier for new contributors to adhere to established coding standards and reducing the cognitive load associated with managing multiple configuration files across the project. * unset package json changes --------- Co-authored-by: Francisco Bischoff <franzbischoff@gmail.com> Co-authored-by: Francisco Bischoff <984592+franzbischoff@users.noreply.github.com>
70 lines
1.5 KiB
JavaScript
70 lines
1.5 KiB
JavaScript
import { defineConfig } from "vite"
|
|
import { fileURLToPath, URL } from "url"
|
|
import postcss from "./postcss.config.js"
|
|
import react from "@vitejs/plugin-react"
|
|
import dns from "dns"
|
|
import { visualizer } from "rollup-plugin-visualizer"
|
|
|
|
dns.setDefaultResultOrder("verbatim")
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
port: 3000,
|
|
host: "localhost"
|
|
},
|
|
define: {
|
|
"process.env": process.env
|
|
},
|
|
css: {
|
|
postcss
|
|
},
|
|
plugins: [
|
|
react(),
|
|
visualizer({
|
|
template: "treemap", // or sunburst
|
|
open: false,
|
|
gzipSize: true,
|
|
brotliSize: true,
|
|
filename: "bundleinspector.html" // will be saved in project's root
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: "@",
|
|
replacement: fileURLToPath(new URL("./src", import.meta.url))
|
|
},
|
|
{
|
|
process: "process/browser",
|
|
stream: "stream-browserify",
|
|
zlib: "browserify-zlib",
|
|
util: "util",
|
|
find: /^~.+/,
|
|
replacement: (val) => {
|
|
return val.replace(/^~/, "")
|
|
}
|
|
}
|
|
]
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
external: [
|
|
// Reduces transformation time by 50% and we don't even use this variant, so we can ignore.
|
|
/@phosphor-icons\/react\/dist\/ssr/
|
|
]
|
|
},
|
|
commonjsOptions: {
|
|
transformMixedEsModules: true
|
|
}
|
|
},
|
|
optimizeDeps: {
|
|
esbuildOptions: {
|
|
define: {
|
|
global: "globalThis"
|
|
},
|
|
plugins: []
|
|
}
|
|
}
|
|
})
|