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.1.2
Describe the bug
create a project and add custom CSS. When run the app you will see that it will crash.
To Reproduce
tns create app --ng
change the name app.css with new.css
add in main.ts
import * as application from "tns-core-modules/application";application.setCssFileName("new.css");
add in app.components.ts : styleUrls:["../new.css"]
change app.css with new.css in webpack.config.js
tns run ios and will see exception:
ERROR in ./new.css Module build failed (from ../node_modules/nativescript-dev-webpack/css2json-loader.js): Error: undefined:1:547: missing '{' at error (/Users/mivanova/Work/appTestnode_modules/tns-core-modules/css/lib/parse/index.js:62:15) at declarations (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:247:25) at rule (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:560:21) at rules (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:117:70) at stylesheet (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:81:21) at Object.module.exports [as parse] (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:564:20) at Object.loader (/Users/mivanova/Work/appTest/node_modules/nativescript-dev-webpack/css2json-loader.js:12:23) @ ./app/app.component.ts 9:21-44 @ ./app/app.module.ts @ ./main.ts
ERROR in ../node_modules/nativescript-dev-webpack/load-application-css-angular.js
Module not found: Error: Can't resolve '~/app' in '/Users/mivanova/Work/appTest/node_modules/nativescript-dev-webpack'
@ ../node_modules/nativescript-dev-webpack/load-application-css-angular.js 5:49-65 6:47-63
@ ./main.ts
Environment Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug create a project and add custom CSS. When run the app you will see that it will crash.
To Reproduce
tns create app --ng
app.css
withnew.css
import * as application from "tns-core-modules/application";
application.setCssFileName("new.css");
app.components.ts
:styleUrls:["../new.css"]
app.css
withnew.css
inwebpack.config.js
tns run ios
and will see exception:ERROR in ./new.css Module build failed (from ../node_modules/nativescript-dev-webpack/css2json-loader.js): Error: undefined:1:547: missing '{' at error (/Users/mivanova/Work/appTestnode_modules/tns-core-modules/css/lib/parse/index.js:62:15) at declarations (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:247:25) at rule (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:560:21) at rules (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:117:70) at stylesheet (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:81:21) at Object.module.exports [as parse] (/Users/mivanova/Work/appTest/node_modules/tns-core-modules/css/lib/parse/index.js:564:20) at Object.loader (/Users/mivanova/Work/appTest/node_modules/nativescript-dev-webpack/css2json-loader.js:12:23) @ ./app/app.component.ts 9:21-44 @ ./app/app.module.ts @ ./main.ts
ERROR in ../node_modules/nativescript-dev-webpack/load-application-css-angular.js Module not found: Error: Can't resolve '~/app' in '/Users/mivanova/Work/appTest/node_modules/nativescript-dev-webpack' @ ../node_modules/nativescript-dev-webpack/load-application-css-angular.js 5:49-65 6:47-63 @ ./main.tsExpected behavior app should work