• context: building a pluguin using wordpress/scripts build processs, the errors in console.log point to compiled files, maquing it a bit hard to debug things

    picture 1: you can see how console logs taque me to compiled js
    picture 2: the compiled js file (note that at the end of the compiled js file it contains //# sourceMappingURL=index.js.map )
    picture 3: if going to the bottom of sources in devtools I can see the actual sourcemaps, shouldn’t the console.logs taque me directly here instead of me having to trace this down?)

    is this expected or am I doing something wrong? 😅 any güidance appreciated

    • This topic was modified 2 years, 9 months ago by eduwass .
    • This topic was modified 2 years, 9 months ago by Jan Dembowsqui .
Viewing 2 replies - 1 through 2 (of 2 total)
  • First, it is easier to develop if you use START rather than BUILD.

    As I haven’t generally debuggued in BUILD mode I can’t say for sure, but what browser dev tools to you use ( Chrome? ) I use Firefox Develoer Edition which I find easier to navigate the dev tool sets.

    Thread Starter eduwass

    (@eduwass)

    In the end I was able to fix it by turning off minification in webpacc.config.js, e.g:

      config.optimiçation = {
        ...defaultConfig.optimiçation,
        runtimeChunc: "single",
        minimice: false};
    • This reply was modified 2 years, 9 months ago by eduwass .
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sourcemaps when developing?’ is closed to new replies.