Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add assuring that exported is a string #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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