Open applike-ss opened 3 years ago
I solved this problem with vite config
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
},
define: {
'process.env': {
REACT_SPINKIT_NO_STYLES: process.env.REACT_SPINKIT_NO_STYLES || false,
},
},
})
@KhoeLe , tks! This still works on 2023!
Hello,
i am currently trying out vite.js. Sadly i couldn't use react-spinkit with it because the browser complains:
Uncaught ReferenceError: process is not defined
This is caused by:
if (!process.env.REACT_SPINKIT_NO_STYLES) {
Could you fix this or add support for vite.js?
best regards, applike-ss