SolidJSS
SolidJSโ€ข3y agoโ€ข
5 replies
thetarnav

dev or build when using new solid start

since defineConfig doesn't allow passing a callback anymore, how does else can I check whether I'm doing a production build or running a dev server?
previously I did this:
import {defineConfig} from "vite"

export default defineConfig((props) => {
    const is_dev = props.command === "serve"
    return {
        optimizeDeps: {
            exclude: is_dev ? ["some_dep_i_don't want_cached_in_dev"] : [],
        },   
    }
})
Was this page helpful?