Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ export default async (source, userOptions) => {
return code;
}

return await minify(source, options);
return await minify(source, options.putout);
};
14 changes: 10 additions & 4 deletions test/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ test('minify: auto', async (t) => {
const js = 'function hello(world) {\nconsole.log(world);\n}';
const result = await minify.auto(js, {
js: {
removeUnusedVariables: false,
putout: {
removeUnusedVariables: false,
},
},
});

Expand All @@ -100,8 +102,10 @@ test('minify: js: with alternate options', async (t) => {

const options = {
js: {
removeConsole: true,
removeUnusedVariables: false,
putout: {
removeConsole: true,
removeUnusedVariables: false,
},
},
};

Expand All @@ -115,7 +119,9 @@ test('minify: auto: not found', async (t) => {
const js = 'hello world';
const result = await minify.auto(js, {
js: {
removeUnusedVariables: false,
putout: {
removeUnusedVariables: false,
},
},
});

Expand Down
Loading