fix: rename SASS worker
This commit is contained in:
@ -75,7 +75,7 @@ export const babelTransformer = cond([
|
|||||||
[stubTrue, identity]
|
[stubTrue, identity]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const sass = new WorkerExecutor('sass');
|
const sassWorker = new WorkerExecutor('sass-compile');
|
||||||
|
|
||||||
const htmlSassTransformCode = file => {
|
const htmlSassTransformCode = file => {
|
||||||
const div = document.createElement('div');
|
const div = document.createElement('div');
|
||||||
@ -84,7 +84,7 @@ const htmlSassTransformCode = file => {
|
|||||||
if (styleTags.length > 0) {
|
if (styleTags.length > 0) {
|
||||||
return Promise.all([].map.call(styleTags, async style => {
|
return Promise.all([].map.call(styleTags, async style => {
|
||||||
style.type = 'text/css';
|
style.type = 'text/css';
|
||||||
style.innerHTML = await sass.execute(style.innerHTML, 2000);
|
style.innerHTML = await sassWorker.execute(style.innerHTML, 2000);
|
||||||
})).then(() => (
|
})).then(() => (
|
||||||
vinyl.transformContents(() => div.innerHTML, file)
|
vinyl.transformContents(() => div.innerHTML, file)
|
||||||
));
|
));
|
||||||
|
@ -6,7 +6,7 @@ module.exports = (env = {}) => {
|
|||||||
mode: __DEV__ ? 'development' : 'production',
|
mode: __DEV__ ? 'development' : 'production',
|
||||||
entry: {
|
entry: {
|
||||||
'frame-runner': './src/client/frame-runner.js',
|
'frame-runner': './src/client/frame-runner.js',
|
||||||
sass: './src/client/workers/sass.js'
|
'sass-compile': './src/client/workers/sass-compile.js'
|
||||||
},
|
},
|
||||||
devtool: __DEV__ ? 'inline-source-map' : 'source-map',
|
devtool: __DEV__ ? 'inline-source-map' : 'source-map',
|
||||||
output: {
|
output: {
|
||||||
|
Reference in New Issue
Block a user