Default behavior of Vite is to let the process.env.* variable when building a library which make sense. In the case of project-sidebar element it is possible that consumers might not have a bundler to deal with it so browsers will complain because process does not make sense in their context.