feat: bundle sass.js with a worker

This commit is contained in:
Valeriy S
2018-12-28 10:49:53 +03:00
committed by Stuart Taylor
parent 59cf2077e1
commit d4b0250988
4 changed files with 11 additions and 5 deletions

View File

@ -16768,6 +16768,11 @@
}
}
},
"sass.js": {
"version": "0.10.13",
"resolved": "https://registry.npmjs.org/sass.js/-/sass.js-0.10.13.tgz",
"integrity": "sha512-kgx2iuK+Rg2GM9mNTL9nYsJVTRp64JcHTIgkkHb+TsZY/+C2X6gd3rD7j+SPohNNHewEIBLZ9zpTpDGXX/3Ksg=="
},
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",

View File

@ -60,6 +60,7 @@
"redux-saga": "^0.16.0",
"reselect": "^3.0.1",
"rxjs": "^6.3.3",
"sass.js": "^0.10.13",
"store": "^2.0.12",
"validator": "^10.7.0",
"webpack-remove-serviceworker-plugin": "^1.0.0"

View File

@ -1,11 +1,8 @@
/* eslint-disable */
importScripts(
'https://cdnjs.cloudflare.com/ajax/libs/sass.js/0.10.11/sass.sync.min.js'
);
import Sass from 'sass.js';
onmessage = e => {
const data = e.data;
Sass.compile(data, result => {
self.postMessage(result.text);
});
}
};

View File

@ -42,6 +42,9 @@ module.exports = (env = {}) => {
}
}
]
},
node: {
fs: 'empty'
}
};
};