This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Support for LESS CSS
#967
Open
Description
Is your feature request related to a problem? Please describe.
If you try to use app.less
instead of app.css
, you will get You may need an appropriate loader to handle this file type.
webpack compilation error.
Describe the solution you'd like
We have to provide less
loader by default (or by an additional plugin).
Workaround
npm i less --save-dev
npm i less-loader --save-dev
- Register the loader in your
webpack.config
:
{
test: /\.less$/,
use: [
{ loader: "css-loader", options: { url: false } },
less-loader"
]
},
- Add the
less
extention in theresolve
section:
extensions: [".js", ".scss", ".less", ".css"],
- Add the
less
extension in thenativescript-dev-webpack/style-hot-loader
regex:
test: /\.(css|scss|less)$/,