-
-
Notifications
You must be signed in to change notification settings - Fork 443
Description
Hello!
Can't exactly say its a bug or I'm missing something
Version: terser 5.6.1
I run a command:
npx terser wwwroot/build/js/admin.js --compress typeofs=false --mangle --comments "/^!/" --output wwwroot/dist/js/admin.min.js
Then I get an error:
Error: ENOENT: no such file or directory, open 'wwwroot/dist/js/admin.min.js'
at Object.openSync (fs.js:476:3)
at Object.writeFileSync (fs.js:1467:35)
at run_cli (C:\Users\Alex\source\repos\x\src\Web\node_modules\terser\dist\bundle.min.js:26901:16)
at run_cli (C:\Users\Alex\source\repos\x\src\Web\node_modules\terser\dist\bundle.min.js:26782:5) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'wwwroot/dist/js/admin.min.js'
}
Expected result: I expect to see minified file in --output wwwroot/dist/js/admin.min.js
If I have "dist" folder empty with no subfolders, I get the error.
If I create "js" folder inside "dist" folder, then minified file is create and I get no error.
Am I missing something or terser just does not create output folders by itself?