Skip to content

fix(css): parse issue with new Webpacked AST css/scss files #8380

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

Merged
merged 3 commits into from
Mar 10, 2020
Merged

fix(css): parse issue with new Webpacked AST css/scss files #8380

merged 3 commits into from
Mar 10, 2020

Conversation

NathanaelA
Copy link
Contributor

PR Checklist

What is the current behavior?

Webpack 1.50 (1.40?) now pre-parses CSS/SCSS using the 'css-loader' and includes the AST for the CSS instead of the raw CSS. This now causes breaking issues when you use addTaggedAdditionalCSS as the file that is webpacked is now no longer CSS, but an AST tree.
All apps that used require(css/scss) with addTaggedAdditionalCSS are now broken.

What is the new behavior?

This changes the addTaggedAdditionalCSS to actual run the same detection code that is used in the fromURI, and abstracts that code into a new function fromDetect Now both fromURI and addTaggedAdditionalCSS call fromDetect so they share the same logic to detect which way the css was handled.

This PR FIXES a BREAKING change caused by a change in the Webpack configuration...

@cla-bot cla-bot bot added the cla: yes label Feb 26, 2020
@dtopuzov
Copy link
Contributor

test

@NativeScript NativeScript deleted a comment from vmutafov Mar 10, 2020
@dtopuzov dtopuzov merged commit 916ec8b into NativeScript:master Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants