1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 05:30:01 +00:00

Added knip configuration and fixed filepaths causing errors

This commit is contained in:
Leslie Tilton
2025-03-25 15:33:57 -05:00
parent abb314a0e7
commit bdccb02fc7
4 changed files with 12 additions and 4 deletions

View File

@@ -206,8 +206,8 @@ const devServer =
server: {
type: "https",
options: {
key: fs.readFileSync("dev-server" + certSuffix + ".pem"),
cert: fs.readFileSync("dev-server" + certSuffix + ".pem"),
key: fs.readFileSync(path.join(__dirname, "dev-server" + certSuffix + ".pem")),
cert: fs.readFileSync(path.join(__dirname, "dev-server" + certSuffix + ".pem")),
},
},
// host: '192.168.1.9',

View File

@@ -1,3 +1,5 @@
import path from "path";
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
// Re-use the OSS CLI webpack config
@@ -6,7 +8,7 @@ const webpackConfig = require("../../apps/cli/webpack.config");
// Update paths to use the bit-cli entrypoint and tsconfig
webpackConfig.entry = { bw: "../../bitwarden_license/bit-cli/src/bw.ts" };
webpackConfig.resolve.plugins = [
new TsconfigPathsPlugin({ configFile: "../../bitwarden_license/bit-cli/tsconfig.json" }),
new TsconfigPathsPlugin({ configFile: path.join(__dirname, "/tsconfig.json") }),
];
module.exports = webpackConfig;

5
knip.json Normal file
View File

@@ -0,0 +1,5 @@
{
"entry": ["{apps,libs,bitwarden_license}/**/src/index.{ts,tsx}"],
"project": ["{apps,libs,bitwarden_license}/**/src/**/*.{ts,tsx}"],
"ignore": ["**/bitwarden_license/**"]
}

View File

@@ -28,7 +28,8 @@
"storybook": "ng run components:storybook",
"build-storybook": "ng run components:build-storybook",
"build-storybook:ci": "ng run components:build-storybook --webpack-stats-json",
"postinstall": "patch-package"
"postinstall": "patch-package",
"knip": "npx knip --production"
},
"workspaces": [
"apps/*",