These are chat archives for AngularClass/angular2-webpack-starter

Apr 2017
Ulhas Mandrawadkar
Apr 18 2017 12:40
I am trying to load less file from component but I am getting error You may need an appropriate loader to handle this file type. Can anyone help me?
i have added less and less-loader in package.json
         * raw and less loader support for *.less files (from Angular components)
         * Returns compiled css content as string
          test: /\.less$/,
          use: ['to-string-loader', 'css-loader', 'less-loader'],
          exclude: [helpers.root('src', 'styles')]
have also added this
using angular2-webpack-starter
Mark Oliver
Apr 18 2017 14:04
Stylus is much more powerful, easier to work with, and has more free plugins than Less. {
test: /.styl$/,
use: ['to-string-loader', 'css-loader', 'stylus-loader']
Mark Oliver
Apr 18 2017 14:22
To use any new extension in addition to the loader add to this line in "resolve" extensions: ['.ts', '.js', '.json', '.styl', '.pug'],
Mark Oliver
Apr 18 2017 14:29
The Less file handling above is being suppressed for handling later with '' or 'webpack.test.js' by the "exclude" for all files in the 'src' or 'styles' directories. Your code is from 'webpack.common.js'
This is from '' {
test: /.scss$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader!sass-loader'
include: [helpers.root('src', 'styles')]