Code Monkey home page Code Monkey logo

Comments (4)

PengQingYao avatar PengQingYao commented on May 26, 2024 2

我也遇到了一样的问题,生成的sourcemap文件里面没内容。老哥后来有解决方案吗。

有解决方案的。 你这样直接返回sourceMap是可以的。但是如果和其他插件一起使用,并且其他插件也有转换的代码的,还是会出现问题。需要做到多个sourceMap串连,babel.transform 有提供一个选项inputSourcemap, 把原始sourcemap 传进去即可。

但是这库用的是parse tranverse generate包,不能传入inputSourceMap.. 需要调整下结构

from vite-plugin-require-transform.

speoth avatar speoth commented on May 26, 2024

我也遇到了一样的问题,生成的sourcemap文件里面没内容。老哥后来有解决方案吗。

from vite-plugin-require-transform.

speoth avatar speoth commented on May 26, 2024

不太清楚rollup原理,我把源码拷到工程vite去引用,在transform函数的return里加了个 map:null,看样子不影响整体sourcemap生成了,但估计有点影响。再研究研究

from vite-plugin-require-transform.

WarrenJones avatar WarrenJones commented on May 26, 2024

1.0.6 已经支持了

from vite-plugin-require-transform.

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.