Comments (12)
@shama I have find the cause of the problem
loaders:[{
test:'/\.css$/',
loader:'style!css!'
}]
It should be
loaders:[{
test: /\.css$/,
loader:'style!css!'
}]
It's my mistake,thanks a lot
from letswritecode.
hello there! @MrBackKom solution worked for me thanks!, with just one slight variation:
If you get the latest version of the css-loader, doesn't allow you to write:
loaders:[{
test: /\.css$/,
loader:'style!css!'
}]
on the webpack.config.js instead you have to write:
{
test: /\.css$/,
loader:[ 'style-loader', 'css-loader' ]
}
It is here, in the usage section, in their repo : (https://github.com/webpack-contrib/css-loader)
from letswritecode.
this should help
{
test: /\.(css|less)$/,
use: ["style-loader", "css-loader", "less-loader"]
}
from letswritecode.
@dsslimshaddy What version of extract-text-webpack-plugin are you using, I am seeing this on ^3.0.0.
from letswritecode.
Work for me
module: {
rules: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
exclude: /(node_modules|bower_components|build)/,
loader: 'babel-loader'
},
{
test: /\.(css|less)$/,
use: ["style-loader", "css-loader"]
}
]
},
from letswritecode.
Yes its fixed. Problem was with extract-text-webpack-plugin . i was using older version. after upgrading to latest it was fixed
from letswritecode.
I have installed the style-loader & css-loader by parameter --save-dev
and this is the json content below.
{
"name": "webpack",
"version": "1.0.0",
"description": "test webpack",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server ./index.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"css-loader": "^0.23.1",
"jquery": "^2.2.0",
"style-loader": "^0.13.0",
"webpack": "^1.12.10",
"webpack-dev-server": "^1.14.0"
}
}
from letswritecode.
Oh great catch @MrBackKom! Glad you figured it out!
from letswritecode.
cant get it to work still
from letswritecode.
@dsslimshaddy You config or error might be slightly different. Feel free to post it and we might be able to help.
from letswritecode.
@dsslimshaddy,but I want to use webpack 1.0, the latest version need webpack 2.0,what should I do?
from letswritecode.
(css|less) worked for me too. But m bit unsure that, if less file are be picked up by less-loader, or traditionally it is being managed by css-loader only. Could anyone please comment in here to clarify?
from letswritecode.
Related Issues (20)
- cannot connect from other device HOT 1
- Needs to be updated [Multi Window Electron] HOT 12
- package.json : no more "package" in scripts HOT 1
- HTML Required HOT 1
- You may need an appropriate loader to handle this file type. HOT 1
- using-npm-on-the-client-side HOT 1
- Nested Loops
- Video streaming Issue. Cannot get Stream of the other peer HOT 4
- How to make promise from web-socket API? HOT 3
- Why does my node_modules folder have so much more stuff than yours? HOT 1
- how to get id to connect ?
- client info not appearing in Text Area?
- window.URL.createObjectURL is deprecated
- why not put in seperate repos i dont want ll them files just for 1 project! HOT 1
- Electron apps outdated HOT 7
- chrome extension authentication to web app
- add gitter chat room HOT 2
- won't connect when clients are not in the same network
- An error at bundle.js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from letswritecode.