NativeScript / NativeScript/nativescript-cli
Using sass (dart-sass) with css2json-loader acts weird and crashes the app
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 6.4.x (probably happens on older)
- Cross-platform modules: 6.4.x (same)
- Android Runtime: 6.4.x
- iOS Runtime: 6.4.x
Describe the bug
An app with SCSS that is handled with sass implementation (dart-sass) and then served through css2json-loader produces code in the form of "undefinedundefined" inside bundle.js, just after the css2json produced code and app crashes on startup. Removing the css2json-loader and using css-loader works normal. Changing Webpack to 4.40.x produces several pages filled with "undefinedundefinedundefined...".
To Reproduce
Use the provided project and try to run it.
Expected behavior
To run.
Sample project
css2json-loader_sass_issue.zip
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided css2json-loader_sass_issue.zip sample with the listed NativeScript versions and the dart-sass pipeline. Inspect bundle.js around the css2json-generated code and compare the result with css-loader; done means the sample app starts without the undefined text or crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sass, webpack
- Domain
- build-system, cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100