-
-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terser returns error if folders, specified in --output parameter are not present in file system #962
Comments
Seems like we could use Line 304 in 38bef40
|
Is there any appetite to work on this? 😕 |
I think it could be a nice option |
Maybe not default behavior? I would definitely use it personally |
Every file processing tool does support this. It doesn't make sense to not support it. |
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?
The text was updated successfully, but these errors were encountered: