diff --git a/src/webpack/QuasarUnusedPlugin.ts b/src/webpack/QuasarUnusedPlugin.ts index 8473b05..0b013c4 100644 --- a/src/webpack/QuasarUnusedPlugin.ts +++ b/src/webpack/QuasarUnusedPlugin.ts @@ -56,8 +56,14 @@ export class QuasarUnusedPlugin implements WebpackPluginInstance { */ apply(compiler: Compiler) { this.#replaceQuasarMacros(compiler) - this.#findUsedComponents(compiler) this.#rewriteQuasarImport(compiler) + + // Don't run when not in production since tree-shaking is disabled anyways + if (compiler.options.mode !== 'production') { + return + } + + this.#findUsedComponents(compiler) this.#modifyQuasarModule(compiler) }