Remove source map support runtime for webpack
- Browsers support source maps OOB - source-map-support is necessary to install to make a sense, but now we only include it in bundle w/o installing - Additional webpack's options like output.library doesn't works with multiple entries if last item is not bundled library #KT-33288 fixed
This commit is contained in:
+1
-2
@@ -117,8 +117,7 @@ open class KotlinWebpack : DefaultTask(), RequiresNpmDependencies {
|
||||
configDirectory = configDirectory,
|
||||
bundleAnalyzerReportDir = if (report) reportDir else null,
|
||||
devServer = devServer,
|
||||
sourceMaps = sourceMaps,
|
||||
sourceMapsRuntime = sourceMaps
|
||||
sourceMaps = sourceMaps
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
-17
@@ -28,7 +28,6 @@ data class KotlinWebpackConfig(
|
||||
var devServer: DevServer? = null,
|
||||
val showProgress: Boolean = false,
|
||||
val sourceMaps: Boolean = false,
|
||||
val sourceMapsRuntime: Boolean = false,
|
||||
val export: Boolean = true,
|
||||
val progressReporter: Boolean = false,
|
||||
val progressReporterPathFilter: String? = null
|
||||
@@ -43,7 +42,6 @@ data class KotlinWebpackConfig(
|
||||
|
||||
if (sourceMaps) {
|
||||
it.add(versions.sourceMapLoader)
|
||||
it.add(versions.sourceMapSupport)
|
||||
}
|
||||
|
||||
if (devServer != null) {
|
||||
@@ -106,7 +104,6 @@ data class KotlinWebpackConfig(
|
||||
|
||||
appendEntry()
|
||||
appendSourceMaps()
|
||||
appendSourceMapsRuntime()
|
||||
appendDevServer()
|
||||
appendReport()
|
||||
appendFromConfigDir()
|
||||
@@ -180,20 +177,6 @@ data class KotlinWebpackConfig(
|
||||
appendln()
|
||||
}
|
||||
|
||||
private fun Appendable.appendSourceMapsRuntime() {
|
||||
if (!sourceMapsRuntime) return
|
||||
|
||||
//language=JavaScript 1.8
|
||||
appendln(
|
||||
"""
|
||||
// source maps runtime
|
||||
if (!config.entry) config.entry = [];
|
||||
config.entry.push('source-map-support/browser-source-map-support.js');
|
||||
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
private fun Appendable.appendSourceMaps() {
|
||||
if (!sourceMaps) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user