Skip to content

Conversation

znck
Copy link
Member

@znck znck commented May 26, 2018

No description provided.

@znck znck force-pushed the feat/async-style-compilation branch from ab490ff to cbcf798 Compare May 26, 2018 06:48
@znck znck requested a review from yyx990803 May 26, 2018 06:48
@@ -73,6 +74,25 @@ export function compileStyle (
code = result.css
outMap = result.map
} catch (e) {
if (/work with async plugins/i.test(e.message)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think automatic detection like this is a good idea - the return value will change between an object and a Promise based on the plugins used and that can be confusing. I think it's more explicit to opt-into async mode.

@znck znck changed the title feat: Auto switch to async style compilation if any async postcss plugin is used feat: Add async style compilation support Jun 1, 2018
README.md Outdated
@@ -116,6 +116,11 @@ interface StyleCompileOptions {
map?: any
scoped?: boolean
trim?: boolean
sync?: boolean // Force sync compilation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be removed and add an entry for compileStyleAsync

@yyx990803 yyx990803 merged commit 54464d6 into vuejs:master Jun 1, 2018
@znck znck deleted the feat/async-style-compilation branch June 2, 2018 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants