worried-yacht-64692
04/18/2023, 2:37 PMfuture-teacher-7046
process.env.
code is removed by whatever code bundler you are using - webpack, rollup, etc.worried-yacht-64692
04/18/2023, 4:25 PMfuture-teacher-7046
plugins: [
replace({
"process.env.NODE_ENV": JSON.stringify("production"),
preventAssignment: true,
}),
]
Frameworks like Next.js automatically add this to the bundler, but it looks like Lit is more barebones and doesn't include anything by defaultworried-yacht-64692
04/18/2023, 4:28 PMfuture-teacher-7046
worried-yacht-64692
04/20/2023, 10:32 AM@web/dev-server
that is implemented like so https://github.com/mark-looptimize/growthbook-demo/blob/main/web-dev-server.config.mjs#L24 and finally a 60 line example implementation using a Lit pattern for code composition they call ReactiveControllers https://github.com/mark-looptimize/growthbook-demo/blob/main/src/feature-controller.ts