#5484·UglifyJS

Minify also imported files?

Author: Leone25Created Jun 3, 2022Updated Jun 3, 2022

Hello

would it be possible to automatically also minify and "link" all the files that are imported with the standard js syntax?

To give an idea index.js:

javascript
import test from './test.js'

console.log(test.hello());

test.js:

javascript
export function hello() {
    return 'Hello, World!';
}

output (sort-of, this was hand made):

javascript
t.h = () => 'Hello, World!';console.log(t.h());

I'm using the js api.

Could this also be done with standard node modules?

I hope I managed to explain my self.

Ty in advance

Rico