is there any chance that the webpack procedure cou...
# javascript
n
is there any chance that the webpack procedure could be improved so that i do not have to open all these folders to look at the code?

https://i.imgur.com/Zgf1rE8.png

I remember this being not as bad without using webpack, also it would be great if it would not contain the original path to the project on the machine it was built on
i
You can click
Ctrl/Cmd + O
and start to type your class name or original filename, and find necessary class or file
n
is there any way to anonymize the source location ? ideally so my code and the libraries i am using are at the top level like
kotlin
in the source view ?
i
disable inline-sourcemap?
n
how do i disable the inline sourcemap ? i can see
sourceMap
and
sourceMapEmbedSources
for now i am monkeypatching it like so...
Copy code
tasks.getByName("browserProductionWebpack").apply {
    doLast {
        val rootDirPath = rootDir.absolutePath.replace('\\', '/')
        val mapFile = project.buildDir.resolve("distributions/${project.name}.js.map")
        mapFile.writeText(
            mapFile.readText()
                .replace("$rootDirPath/build/js/src/main/", "")
                .replace("$rootDirPath/build/src/main/", "")
                .replace("$rootDirPath/build/js/node_modules", "node_modules")
                .replace(rootDirPath, rootDir.name)
        )
    }
}
the mapped sources are really all over the place.. like.. why are some dependencies mapped into subfolders of my project while others are prefixed with
../../
?
i
try to add
config.devtool=false
to a js file in
webpack.config.d
Something is base64.
n
@iseki that works.. in making it not listed in the devtool of chrome at all, but ideally i would want to fix up the paths so all libraries are prefixed iwht their group and not in random folders under my project directory or such
s
@Nikky Can you please create https://kotl.in/issue about that?
n
created a issue for the unorganized sourcemaps https://youtrack.jetbrains.com/issue/KT-36208?project=kt
🙏 1