Skip to content

Conversation

@zhakhalov
Copy link

I have met issue caused by using of ExtractTextPlugin with following error message:

Expected 'styleUrls' to be an array of strings.

Idea of my fix is an ensuring that each element of styleUrls is a string.
The result (in bundle) looks like:

core_1.Component({
    ...
    styles: [typeof __webpack_require__(296) === 'string' ? __webpack_require__(296) : '']
    ...
})

I would not like to update tests untill your approval of solution.
Waiting for your response.
Thanks in advance.

@abierbaum
Copy link

@zhakhalov This would work very well for my case. I am using style-loader to pull the generated css in outside of the component (so I can do hot reload) and had to work around the fact that what ends up in styles is not a string. Would love it if this was done automatically.

@zhakhalov
Copy link
Author

Hey @TheLarkInn
Is this PR going to be merged?

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