Answer the question
In order to leave comments, you need to log in
Which webpack loader to use to load css?
in app.js:
in dev console:import 'lightbox2/dist/css/lightbox.css';
./node_modules/lightbox2/dist/css/lightbox.css
Module parse failed: Unexpected token (1:26)
You may need an appropriate loader to handle this file type.
{
test: /\.(css|scss)$/,
exclude: /node_modules/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
importLoaders: 1,
modules: true,
import: true
}
},
{
loader: 'postcss-loader'
},
{
loader: 'sass-loader'
},
{
loader: 'stylefmt-loader',
options: {
config: '.stylelintrc'
}
}
],
publicPath: distPath
})
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question