babel-plugin-qunit-lazy-imports
v1.2.0
Published
Babel plugin that transforms imports in QUnit test files to lazy imports in beforeEach hooks
Maintainers
Readme
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-importsContributing
contributions welcome! (I get GitHub emails)
