How to load library source maps using webpack?

前端 未结 3 1044
南笙
南笙 2021-02-03 17:48

I\'m building two projects with webpack; one is a library for the other.

Is it possible to consume the sourcemaps from my library project when building my wrapper projec

3条回答
  •  没有蜡笔的小新
    2021-02-03 18:31

    You should be able to use any of the eval source map options that Webpack provides.

    Really that just amounts to setting the right devtool option in your webpack.config.js for the my-lib project.

    devtool: 'eval',
    

    eval and eval-source-maps should both work.

    See the Webpack source map documentation for the various options.

提交回复
热议问题