Compare commits
2 Commits
develop
...
minify-thr
Author | SHA1 | Date |
---|---|---|
webzwo0i | 16217a8aa1 | |
webzwo0i | 849f3ec8e1 |
|
@ -35,7 +35,8 @@ const logger = log4js.getLogger('Minify');
|
|||
|
||||
const ROOT_DIR = path.join(settings.root, 'src/static/');
|
||||
|
||||
const threadsPool = new Threads.Pool(() => Threads.spawn(new Threads.Worker('./MinifyWorker')), 2);
|
||||
const threadWorker = new Threads.Worker('./MinifyWorker');
|
||||
const threadsPool = new Threads.Pool(() => Threads.spawn(threadWorker), 2);
|
||||
|
||||
const LIBRARY_WHITELIST = [
|
||||
'async',
|
||||
|
|
|
@ -18,6 +18,7 @@ const compressCSS = async (filename, ROOT_DIR) => {
|
|||
const output = await new CleanCSS({
|
||||
rebase: true,
|
||||
rebaseTo: basePath,
|
||||
returnPromise: true,
|
||||
}).minify([absPath]);
|
||||
return output.styles;
|
||||
} catch (error) {
|
||||
|
|
Loading…
Reference in New Issue