1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-05 11:13:44 +00:00
Files
browser/apps/cli/webpack.npm.config.js
addisonbeck 2266a17a13 feat(cli): integrate Nx with CLI application
- Add project.json with build, serve, test, and lint targets
- Support both OSS and Bit configurations via Nx configurations
- Maintain backward compatibility with existing npm build scripts
- Update webpack configs to work with both Nx and direct webpack CLI calls
- Enable nx build cli --configuration=[oss|oss-dev|bit|bit-dev] commands
- Enable nx serve cli for development workflow with watch mode
- Preserve all existing npm run build:* commands for compatibility
2025-09-09 06:51:55 -04:00

24 lines
641 B
JavaScript

const path = require("path");
const { getSharedConfig } = require("./webpack.shared");
// Original npm/webpack CLI logic
if (process.env.NODE_ENV == null) {
process.env.NODE_ENV = "development";
}
const ENV = (process.env.ENV = process.env.NODE_ENV);
const mode = ENV;
// npm-specific path configuration
const options = {
env: ENV,
mode: mode,
entryPoint: "./src/bw.ts",
outputPath: path.resolve(__dirname, "build"),
modulesPath: [path.resolve("../../node_modules")],
tsconfigPath: "./tsconfig.json",
localesPath: "./src/locales",
externalsModulesDir: "../../node_modules",
};
module.exports = getSharedConfig(options);