Giter Site home page Giter Site logo

Comments (5)

dbliu91 avatar dbliu91 commented on August 9, 2024

谷歌到一篇博客说了下使用babel转换的代码,调试不方便的问题。但我太多基本概念都没有,看不懂。不知道在哪里配置。

2016-04-05_10-45-19

from antd-init.

sorrycc avatar sorrycc commented on August 9, 2024

启用 source-map 。

from antd-init.

dbliu91 avatar dbliu91 commented on August 9, 2024

你好,可不可以具体一点,我很多基本概念都没有。

我个人的理解是sourcemap已经起作用了。babel先把代码从es6转为es5,然后webpack把代码打包为单文件。sourcemap现在对应的是已经被babel转过的es5代码。(不知道我理解的对不对)

现在想让sourcemap对应上转换前的(es6)的代码,但不知道怎么做。。。。。

from antd-init.

sorrycc avatar sorrycc commented on August 9, 2024

抱歉,前面没看仔细,确实有这个问题。es3ify 没有处理 source-map,所以这部分目前是转换不了的。如果你的项目不需要支持 IE8,或者调试阶段不需要考虑 IE8,可以先把这行注释掉:

  // Fix ie8 compatibility
  webpackConfig.module.loaders.unshift({
    test: /\.jsx?$/,
    loader: 'es3ify-loader',
  });

from antd-init.

dbliu91 avatar dbliu91 commented on August 9, 2024

thanks。的确是这样。

from antd-init.

Related Issues (20)

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.