Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Script with lang="ts" should be typescript-ed #3

Closed
wants to merge 1 commit into from
Closed

Script with lang="ts" should be typescript-ed #3

wants to merge 1 commit into from

Conversation

zigomir
Copy link

@zigomir zigomir commented May 10, 2017

Otherwise build with .vue component files will fail.

Otherwise build with `.vue` component files will fail.
@msftclas
Copy link

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

@octref
Copy link

octref commented May 11, 2017

@zigomir
Copy link
Author

zigomir commented May 11, 2017

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.

@DanielRosenwasser
Copy link
Member

@octref @HerringtonDarkholme any idea about whether this change sounds appropriate?

@HerringtonDarkholme
Copy link

HerringtonDarkholme commented May 13, 2017

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

@HerringtonDarkholme
Copy link

Fix has been released as 12.0.4.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented May 14, 2017

@zigomir can you try out the latest ts-loader and see if that helps with the issue you ran into?

@zigomir
Copy link
Author

zigomir commented May 14, 2017

Yes, this fixes it! Thanks @HerringtonDarkholme and @DanielRosenwasser!

@zigomir zigomir closed this May 14, 2017
@zigomir zigomir deleted the patch-2 branch May 14, 2017 19:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants