Skip to content

Commit 12bb490

Browse files
authored
Fix/cli webpack dirname esm (#123)
* feat: add CLI support, Twitter media upload, tsconfig modernization (v1.7.0) * fix: use process.cwd() in webpack CLI config to avoid __dirname ESM error
1 parent c7fd7f1 commit 12bb490

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

webpack.cli.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ import type { Configuration } from "webpack";
33

44
/**
55
* Webpack config that bundles the CLI into a single standalone JS file.
6-
* The output (dist/loopi-cli.js) is included as an extraResource in the
7-
* packaged Electron app so users can run `loopi` from their terminal.
86
*/
97
export const cliConfig: Configuration = {
108
target: "node",
119
mode: "production",
1210
entry: "./src/cli/runWorkflow.ts",
1311
output: {
14-
path: path.resolve(__dirname, "dist"),
12+
path: path.resolve(process.cwd(), "dist"),
1513
filename: "loopi-cli.js",
1614
},
1715
module: {

0 commit comments

Comments
 (0)