Allow features to require optional permissions

Design doc:
https://docs.google.com/document/d/1OhL0Yh7SmWffXyjW_XVQOK95Fqh7gLltk1eEtnKN8Ds/edit

Fixed: twpowertools:86
Change-Id: Iccb22aac2b285307854b7a4c002e9702c24d57f2
diff --git a/webpack.config.js b/webpack.config.js
index 2c94b12..660d631 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -121,6 +121,20 @@
             },
           ],
         },
+        {
+          test: /\.js$/i,
+          use: [
+            {
+              loader: 'webpack-preprocessor-loader',
+              options: {
+                params: {
+                  browser_target: env.browser_target,
+                  production: args.mode == 'production',
+                },
+              },
+            },
+          ],
+        },
       ]
     },
   };