Closed ulivz closed 6 years ago
This happened to me as well.
Compiled js before (version 1.1.0)
result = postcss(plugins).process(source, postCSSOptions);
Compiled js after (version 1.2.0):
result = postcss_1.default(plugins).process(source, postCSSOptions);
Fixed in 1.2.1
.
Summary
Version: 1.2.0
Recently many users reported an error at https://github.com/vuejs/vuepress/issues/268, and I reproduced it at my local.
After the investigation, I found:
https://github.com/vuejs/component-compiler-utils/blob/14d4ced9bc7ac4514bcbf51ca133529088c2887b/lib/compileStyle.ts#L70
It's will be compiled into:
But in postcss's dist code, the module was exported as:
So the module should be used as
postcss_1
instead ofpostcss_1.default
.And I don't know if this is a problem of TSC. but it's truly a issue introduced by upgrade of
vue-loader
/@vuejs/component-compiler-utils