You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal is be able to use SASS for styling components in development(without webpack and AOT) and for production(with webpack/AOT) with the following syntax:
Assuming you are using the nativescript-dev-webpack {N} plugin and and the @ngtools/webpack webpack plugin.
The .scss files will be compiled and bundled by the webpack build - so no changes are required as long as you have the webpack configured to handle .scss files
Without Webpack/AOT
The .scss files will be compiled by the nativescript-dev-sass plugin in a before-prepare. This will generate my-component.css file. However, we need to be able to load the compiled .css file runtime, when the my-component.scss is requested by angular runtime compiler. Note: The nativescript-dev-sass plugin should clear all .scss so that they are not availabe in the app.
Solution
Make changes in the FileSystemResourceLoader so that it fallbacks to loading .css file, if a .scss file was requested and not found.
The text was updated successfully, but these errors were encountered:
vakrilov
changed the title
Allow loading .css files as a fallback
Feat: Allow loading .css files as a fallback
Aug 22, 2017
vakrilov
changed the title
Feat: Allow loading .css files as a fallback
Feature: Allow loading .css files as a fallback
Aug 22, 2017
vakrilov
changed the title
Feature: Allow loading .css files as a fallback
Feature: Allow loading .css files as a fallback to .scss
Aug 22, 2017
vakrilov
changed the title
Feature: Allow loading .css files as a fallback to .scss
Feature: Allow loading .css files as a fallback if no .scss file is found
Aug 22, 2017
The goal is be able to use SASS for styling components in development(without webpack and AOT) and for production(with webpack/AOT) with the following syntax:
With Webpack/AOT
Assuming you are using the
nativescript-dev-webpack
{N} plugin and and the@ngtools/webpack
webpack plugin.The
.scss
files will be compiled and bundled by the webpack build - so no changes are required as long as you have the webpack configured to handle.scss
filesWithout Webpack/AOT
The
.scss
files will be compiled by thenativescript-dev-sass
plugin in abefore-prepare
. This will generatemy-component.css
file. However, we need to be able to load the compiled.css
file runtime, when themy-component.scss
is requested by angular runtime compiler.Note: The
nativescript-dev-sass
plugin should clear all.scss
so that they are not availabe in the app.Solution
Make changes in the
FileSystemResourceLoader
so that it fallbacks to loading.css
file, if a.scss
file was requested and not found.The text was updated successfully, but these errors were encountered: