Coder Social home page Coder Social logo

Comments (6)

ParryQiu avatar ParryQiu commented on July 17, 2024

这个问题是没有加载到 CSS 对应的 loader 造成的,你尝试删除 node_modules 文件夹后重新执行 npm install 加载所有的包再编译运行试一下。

from imooc-react.

yumengzhong avatar yumengzhong commented on July 17, 2024

@ParryQiu 后来我通过另一种方式实现了,您说的我还没有实验
image

from imooc-react.

ParryQiu avatar ParryQiu commented on July 17, 2024

绿框不行是因为没有加载 babel-plugin-react-html-attrs 包。
不过我看你已经配置了,应该还是包加载的问题。
你可以删除了重新加载包试试。

from imooc-react.

zengyanzi avatar zengyanzi commented on July 17, 2024

我也出现类似的问题,而且不仅是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.

ParryQiu avatar ParryQiu commented on July 17, 2024

@zengyanzi 配置文件中的 style 修改成 style-loader 即可。你应该是安装了 2.0 的 webpack,配置需要进行相应的变更。

from imooc-react.

zengyanzi avatar zengyanzi commented on July 17, 2024

@ParryQiu 非常感谢!!!

from imooc-react.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.