Skip to content

Commit

Permalink
Disable tree shaking in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Oct 7, 2022
1 parent 7332802 commit 6714be0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/webpack/QuasarUnusedPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 6714be0

Please sign in to comment.