static-import

Teaches static ES2015 import syntax for module dependencies. Use when you need to import code that is required at load time and benefits from static analysis…

INSTALLATION
npx skills add https://github.com/patternsdev/skills --skill static-import
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$27

The modules get executed as soon as the engine reaches the line on which we import them.

Since the components were statically imported, Webpack bundled the modules into the initial bundle:

Asset           Size      Chunks            Chunk Names

main.bundle.js  1.5 MiB    main  [emitted]  main

Our chat application's source code gets bundled into one bundle: main.bundle.js. A large bundle size can affect the loading time of our application significantly depending on the user's device and network connection. Before the App component is able to render its contents to the user's screen, it first has to load and parse all modules.

Luckily, there are many ways to speed up the loading time! We don't always have to import all modules at once: maybe there are some modules that should only get rendered based on user interaction, like the EmojiPicker in this case, or rendered further down the page. Instead of importing all component statically, we can dynamically import the modules after the App component has rendered its contents and the user is able to interact with our application.

Source

BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card