1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-26 08:11:17 +02:00

add prettier for html support

This commit is contained in:
Kushagra Gour
2018-11-16 14:59:18 +05:30
parent f073413c89
commit 8b9fe4da3c
6 changed files with 30234 additions and 9 deletions

View File

@@ -465,7 +465,7 @@ export function prettify(content, type = 'js') {
const worker = new Worker(
chrome.extension
? chrome.extension.getURL('lib/prettier-worker.js')
: `${BASE_PATH}/lib/prettier-worker.js`
: `${BASE_PATH === '/' ? '' : BASEPATH}/lib/prettier-worker.js`
);
worker.postMessage({ content, type });
worker.addEventListener('message', e => {