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
{{ message }}
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
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.2.x
Cross-platform modules: 6.2.x
Android Runtime: 6.2.x
iOS Runtime: 6.2.x
Plugin(s):
Node.js:
Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack
Describe the bug
The following syntax doesn't work anymore after updating to NativeScript 6.2:
@import 'common.css';
To Reproduce
tns create myApp --ng
cd myApp && cd src && touch common.css
Open app.css and add @import 'common.css';
tns run ios
The following error will be shown:
ERROR in ./app.css
Module not found: Error: Can't resolve 'common.css' in '/Users/<myuser>/Work/nativescript-cli/scratch/myApp/src'
@ ./app.css 3:53-141
@ ../node_modules/nativescript-dev-webpack/load-application-css-angular.js
@ ./main.ts
Executing webpack failed with exit code 2.
Expected behavior
The described syntax is working with NativeScript 6.1 and it should work with NativeScript 6.2. as well.
Additional context
Workaround:
The import should be changed with relative path e.g. @import './common.css'
It seems that after changing css-loader with css2json-loader, module imports of .css file doesn't work anymore and only relative imports are supported.
The issue is not reproduced with .scss files.
The text was updated successfully, but these errors were encountered:
After changing `css-loader` with `css2json-loader`, we have an issue that module imports of local css files doesn't work anymore - #1098. As it turns out that we don't have applications that test this scenario, we decided to add such an import in demo JavaScript application.
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):CLI: 6.2.x
Cross-platform modules: 6.2.x
Android Runtime: 6.2.x
iOS Runtime: 6.2.x
Plugin(s):
Node.js:
Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack
Describe the bug
The following syntax doesn't work anymore after updating to NativeScript 6.2:
To Reproduce
tns create myApp --ng
cd myApp && cd src && touch common.css
app.css
and add@import 'common.css';
tns run ios
The following error will be shown:
Expected behavior
The described syntax is working with NativeScript 6.1 and it should work with NativeScript 6.2. as well.
Additional context
Workaround:
The import should be changed with relative path e.g.
@import './common.css'
It seems that after changing
css-loader
withcss2json-loader
, module imports of.css
file doesn't work anymore and only relative imports are supported.The issue is not reproduced with
.scss
files.The text was updated successfully, but these errors were encountered: