Comments (6)
这个问题是没有加载到 CSS 对应的 loader 造成的,你尝试删除 node_modules 文件夹后重新执行 npm install 加载所有的包再编译运行试一下。
from imooc-react.
@ParryQiu 后来我通过另一种方式实现了,您说的我还没有实验
from imooc-react.
绿框不行是因为没有加载 babel-plugin-react-html-attrs 包。
不过我看你已经配置了,应该还是包加载的问题。
你可以删除了重新加载包试试。
from imooc-react.
我也出现类似的问题,而且不仅是css,css搞定了之后还有如下问题,是loader需要重新配置了吗?多谢
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'style-loader' instead of 'style',
see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
@ ./src/js/components/footer.js 17:14-45
@ ./src/js/index.js
from imooc-react.
@zengyanzi 配置文件中的 style 修改成 style-loader 即可。你应该是安装了 2.0 的 webpack,配置需要进行相应的变更。
from imooc-react.
@ParryQiu 非常感谢!!!
from imooc-react.
Related Issues (2)
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 imooc-react.