title: Exclude obfuscation of firebase imports using js-obfuscator webpack plugin
body: <p>I would like to obfuscate my code but not Firebase import code using webpack and js-obfuscator plugin. Obfuscating Firebase code nearly doubles its size(more than 500kb)!</p>
  <p>I tried many things like setting ignoreRequireImports to true. But that seems to work only with require imports and not tree shakable imports.</p>
  <p>I also tried // javascript-obfuscator:disable comment around the import lines but that did not solved the problem either...</p>
  <p>Here is my webpack.config.js:</p>
  <pre><code>const path = require('path');
  
  var WebpackObfuscator = require('webpack-obfuscator');
  
  module.exports = {
      mode:'production',
      devtool:'source-map',
      entry: { //'./src/firebaseConfig.js',
          //firebaseConfig:'./src/firebaseConfig.js',
          'scripts/signIn':'./src/signIn.js'
      },
      
      plugins:[
          new WebpackObfuscator({rotateStringArray: true, reservedStrings: [ '\s*' ]}, [])
      ],
      module:{
          rules:[
              {
                  enforce: 'post',
                  use: {
                      loader: WebpackObfuscator.loader,
                      options: {
                          rotateStringArray: true,
                          reservedStrings: [ '\s*' ],
                          ignoreRequireImports:true
                      }
                  }
              }
          ]
      },
      output:{
          path:path.resolve(__dirname,'public'),
          filename:&quot;[name].bundle.js&quot;
          
      },   
      watch:true
  }
  </code></pre>
  <p>Here is my source js file code:</p>
  <p>import { initializeApp } from 'firebase/app';</p>
  <pre><code>import {
      getAuth 
  }from 'firebase/auth';
  
  
  import {
      getFirestore,
      collection,   
      getDocs    
  } from 'firebase/firestore';
  
  initializeApp(firebaseConfig);
  
  const db = getFirestore();
  const auth=getAuth();
  
  const colRef=collection(db,'books');
  
  console.log(test);
  
  getDocs(colRef).then((snapshot)=&gt;{
      let books =[];
      snapshot.docs.forEach((doc)=&gt;{
          books.push({...doc.data(),id:doc.id})
      })
      console.log(books);
  }).catch(err =&gt; {    
      
      console.log(err); 
  })
  </code></pre>
  <p>Thank you!</p>