🐛 BUG: Using chakra causes `snowpack dev` to take 42 seconds
See original GitHub issueQuick checklist
- I am using the latest version of Snowpack and all plugins.
What package manager are you using?
npm
What operating system are you using?
Windows
Describe the bug
snowpack dev
takes 90 seconds when warmed up. (42 in the below demo app).
This is reproducible on 2 separate people and machines.
Guessing this is more of the way Chakra
is organised, but would consider this a bug considering it takes so long, and the output says server started in 38ms
. Feel like I’ve been lied to!
Steps to reproduce
npx create-snowpack-app
using template @snowpack/app-template-react-typescript- Install chakra:
npm i @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^4
- Change
App.tsx
to use chakra:
import React from 'react';
import {
Center,
ChakraProvider,
CSSReset,
extendTheme,
} from '@chakra-ui/react';
interface AppProps {}
const theme = extendTheme({
components: {
Button: {
baseStyle: {
_focus: {
boxShadow: 'none',
},
},
},
},
});
function App({}: AppProps) {
return (
<ChakraProvider theme={theme}>
<CSSReset />
<Center height="100vh"></Center>
</ChakraProvider>
);
}
export default App;
- Run
npm start
takes 73s to run cold:
PS C:\src\snowpack-chakra-slow-test> get-date; npm start
03 July 2021 23:06:26
> start
> snowpack dev
[24:07:28] [snowpack] + @chakra-ui/react@1.6.4
[24:07:28] [snowpack] └── @chakra-ui/css-reset@1.0.0
[24:07:28] [snowpack] └── @emotion/react@11.4.0
[24:07:29] [snowpack] └── react@17.0.2 (dedupe)
-- 7000 similar lines like previous 3, going through dep tree
[24:08:39] [snowpack] Ready!
[24:08:39] [snowpack] Server started in 50ms.
[24:08:39] [snowpack] Local: http://localhost:8080
[24:08:39] [snowpack] Network: http://172.17.48.1:8080
[24:08:39] [@snowpack/plugin-typescript] 23:07:39 - Starting compilation in watch mode...
[24:08:44] [@snowpack/plugin-typescript] 23:07:44 - Found 0 errors. Watching for file changes.
Not sure why Snowpack increments hour and minute by 1 😂 🤷♂️
- run
npm start
again (warm) takes 42 seconds. In our actual project takes about 90 seconds, as we have a plethora of other packages installed)
PS C:\src\snowpack-chakra-slow-test> get-date;npm start
03 July 2021 23:19:13
> start
> snowpack dev
[24:20:55] [snowpack] Ready!
[24:20:55] [snowpack] Server started in 38ms.
[24:20:55] [snowpack] Local: http://localhost:8080
[24:20:55] [snowpack] Network: http://172.17.48.1:8080
[24:20:55] [@snowpack/plugin-typescript] 23:19:55 - Starting compilation in watch mode...
[24:21:00] [@snowpack/plugin-typescript] 23:20:00 - Found 0 errors. Watching for file changes.
This is on a decentish speced laptop (albeit 2/3 years old)
Operating System: Windows 10 Pro 64-bit (10.0, Build 19043) (19041.vb_release.191206-1406)
System Manufacturer: HP
System Model: HP Spectre x360 Convertible 15-ch0xx
Processor: Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz (8 CPUs), ~3.1GHz
Link to minimal reproducible example (optional)
michal-ciechan/snowpack-chakra-slow-test: Example of snowpack slowness with chakra
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Untitled
Mirages are caused by, Peliculas mexicanas en japon! ... Ice age wallpaper 4, Use inconstant in a sentence, Pachelbel canon in g piano,...
Read more >wRD - River Thames Conditions
Chem 7 diagram fishbone, Geometra walter sartori, Quality control uses, ... Adresa router linksys, Kamerzysta wesele lomza, Hochu viagry, Bugs bunny and ...
Read more >mn 0 01 05_1 1 10 100 10th 11 11_d0003 12 13 14 141a
... 30 3000d_11 31 32 33 34 35 36 3600 3603 3670 37 38 39 3rd 4 40 41 42 43 4341 44...
Read more >736 kB - Hugging Face
1 ·where 1 ·way 1 ·make 1 ·being 1 ·going 1 ·down 1 ·any 1 ... 1 ·challenged 1 ·Use 1 ·formation 1...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for filing. We’re working on some improvements to
esinstall
(the package that does all the preparation that takes so long) that should speed this up drastically.Thanks for your patience. In the recent
snowpack@3.8.7
release, startup times across the board have improved. I’m seeing ~15 second cold start on my machine for@chakra-ui/react
and all deps, with subsequent startups being instant, of course.