tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

webpack.asrouter-admin.config.js (1104B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 const path = require("path");
      6 const config = require("./webpack.base.config.js");
      7 const webpack = require("webpack");
      8 const absolute = relPath => path.join(__dirname, relPath);
      9 const banner = `
     10 NOTE: This file is generated by webpack from ASRouterAdmin.jsx
     11 using the npm bundle task.
     12 `;
     13 module.exports = Object.assign({}, config(), {
     14  entry: absolute("content-src/components/ASRouterAdmin/ASRouterAdmin.jsx"),
     15  output: {
     16    path: absolute("content"),
     17    filename: "asrouter-admin.bundle.js",
     18    library: "ASRouterAdminRenderUtils",
     19  },
     20  externals: {
     21    "prop-types": "PropTypes",
     22    react: "React",
     23    "react-dom": "ReactDOM",
     24  },
     25  plugins: [new webpack.BannerPlugin(banner)],
     26  // This resolve config allows us to import with paths relative to the root directory
     27  resolve: {
     28    extensions: [".js", ".jsx", ".mjs"],
     29    alias: {
     30      modules: absolute("modules"),
     31    },
     32  },
     33 });