Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

babel-plugin-qunit-lazy-imports

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-qunit-lazy-imports

Babel plugin that transforms imports in QUnit test files to lazy imports in beforeEach hooks

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
0
Created
Source

babel-plugin-qunit-lazy-imports

A babel plugin to transform all imports in your qunit tests to be lazy so in your vite (or similar) projects, your tests only import what modules you're qunit modules are about to run.

Setup

In your babel config:

module.exports = {
  plugins: [
    [
      "module:babel-plugin-qunit-lazy-imports",
      {
        // Both options are optional, but one must be present
        startsWith: ["module-to-be-async/"],
        matches: [/some-regex/],
      },
    ],
  ],
};

Install

npm add babel-plugin-qunit-lazy-imports

Contributing

contributions welcome! (I get GitHub emails)

Keywords

babel

FAQs

Package last updated on 21 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts