Closed zigomir closed 7 years ago
This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request. Thanks, Microsoft Pull Request Bot
This is already covered by https://github.com/TypeStrong/ts-loader#appendtssuffixto-regexp-default
I see. My change is only needed when ExtractTextPlugin
is used when you want to extract styles from SFC
into separate .css
file. It's a big gotcha, not really sure why it is happening.
@octref @HerringtonDarkholme any idea about whether this change sounds appropriate?
I can reproduce building error if setting extractCSS
to true. https://github.com/vuejs/vue-loader/blob/master/docs/en/configurations/extract-css.md
Hmm, it seems to be a bug in vue-loader though. I need some more investigation.
Update: it seems to be vue-loader's behavior. If extractCSS
is true, it will consult css-loader if loaders[lang]
, in this case 'ts-loader', is not explicitly configured. https://github.com/vuejs/vue-loader/blob/master/lib/loader.js#L216-L218
Fix has been released as 12.0.4.
@zigomir can you try out the latest ts-loader
and see if that helps with the issue you ran into?
Yes, this fixes it! Thanks @HerringtonDarkholme and @DanielRosenwasser!
Otherwise build with
.vue
component files will fail.