diff --git a/apps/web/webpack.config.js b/apps/web/webpack.config.js index d172ea95c71..172dafa9b46 100644 --- a/apps/web/webpack.config.js +++ b/apps/web/webpack.config.js @@ -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', diff --git a/bitwarden_license/bit-cli/webpack.config.js b/bitwarden_license/bit-cli/webpack.config.js index 3e991f7971e..18652383983 100644 --- a/bitwarden_license/bit-cli/webpack.config.js +++ b/bitwarden_license/bit-cli/webpack.config.js @@ -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; diff --git a/knip.json b/knip.json new file mode 100644 index 00000000000..8354cfce3cf --- /dev/null +++ b/knip.json @@ -0,0 +1,5 @@ +{ + "entry": ["{apps,libs,bitwarden_license}/**/src/index.{ts,tsx}"], + "project": ["{apps,libs,bitwarden_license}/**/src/**/*.{ts,tsx}"], + "ignore": ["**/bitwarden_license/**"] +} diff --git a/package.json b/package.json index 943fde5fcf3..e46fe76a997 100644 --- a/package.json +++ b/package.json @@ -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/*",