diff --git a/manual/src/ornate/cookbook.md b/manual/src/ornate/cookbook.md index 4fa909e4..d6f0019a 100644 --- a/manual/src/ornate/cookbook.md +++ b/manual/src/ornate/cookbook.md @@ -287,7 +287,7 @@ webpackDevServerExtraArgs := Seq("--inline") `webpack` is then called with the following arguments: ~~~ ---bail --config +--config ~~~ You can add extra params to the `webpack` call, for example, to increase debugging diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/PackageJson.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/PackageJson.scala index 236d3ffc..d8b34ab9 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/PackageJson.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/PackageJson.scala @@ -42,25 +42,18 @@ object PackageJson { val sourceMapLoaderVersion = NpmPackage(webpackVersion).major match { - case Some(1) | Some(2) => "0.1.5" - case Some(3) => "0.2.1" - case Some(4) => "0.2.3" - case Some(x) => sys.error(s"Unsupported webpack major version $x") - case None => sys.error("No webpack version defined") - } - - val webpackPackages = - NpmPackage(webpackVersion).major match { - case Some(1) | Some(2) | Some(3) => Seq("webpack" -> webpackVersion) - case Some(4) => Seq("webpack" -> webpackVersion, "webpack-cli" -> webpackCliVersion) - case _ => Seq.empty + case Some(5) => "2.0.0" + case Some(x) => sys.error(s"Unsupported webpack major version $x") + case None => sys.error("No webpack version defined") } val devDependencies = npmDevDependencies ++ ( if (currentConfiguration == Compile) npmManifestDependencies.compileDevDependencies else npmManifestDependencies.testDevDependencies - ) ++ webpackPackages ++ Seq( + ) ++ Seq( + "webpack" -> webpackVersion, + "webpack-cli" -> webpackCliVersion, "webpack-dev-server" -> webpackDevServerVersion, "concat-with-sourcemaps" -> "1.0.7", // Used by the reload workflow "source-map-loader" -> sourceMapLoaderVersion // Used by webpack when emitSourceMaps is enabled @@ -77,7 +70,6 @@ object PackageJson { log.debug("Writing 'package.json'") IO.write(targetFile, packageJson.toJson) - () } /** diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Stats.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Stats.scala index 819c3dbd..9f0ab4e1 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Stats.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Stats.scala @@ -1,8 +1,6 @@ package scalajsbundler -import java.time.LocalDateTime - import play.api.libs.json._ import play.api.libs.functional.syntax._ import sbt.Logger @@ -15,7 +13,16 @@ import java.nio.file.Path */ object Stats { - final case class Asset(name: String, size: Long, emitted: Option[Boolean], chunkNames: List[String]) + final case class Asset(name: String, size: Long, emitted: Boolean, chunkNames: List[String]) { + def formattedSize: String = { + val oneKiB = 1024L + val oneMiB = oneKiB * oneKiB + + if (size < oneKiB) s"$size bytes" + else if (size < oneMiB) f"${size / oneKiB.toFloat}%1.2f KiB" + else f"${size / oneMiB.toFloat}%1.2f MiB" + } + } object formatting { @@ -43,7 +50,19 @@ object Stats { } - final case class WebpackStats(version: String, hash: String, time: Long, outputPath: Option[Path], errors: List[String], warnings: List[String], assets: List[Asset]) { + final case class WebpackError(moduleName: String, message: String, loc: String) + + final case class WebpackWarning(moduleName: String, message: String) + + final case class WebpackStats( + version: String, + hash: String, + time: Long, + outputPath: Option[Path], + errors: List[WebpackError], + warnings: List[WebpackWarning], + assets: List[Asset] + ) { /** * Prints to the log an output similar to what webpack pushes to stdout @@ -51,12 +70,12 @@ object Stats { def print(log: Logger): Unit = { import formatting._ // Print base info - List(s"Version: $version", s"Hash: $hash", s"Time: ${time}ms", s"Path: ${outputPath.getOrElse("")}", s"Built at ${LocalDateTime.now}").foreach(x => log.info(x)) + List(s"Version: $version", s"Hash: $hash", s"Time: ${time}ms", s"Path: ${outputPath.getOrElse("")}").foreach(x => log.info(x)) log.info("") // Print the assets assets.map { a => - val emitted = a.emitted.fold("")(a => if (a) "[emitted]" else "") - AssetLine(Part(a.name), Part(a.size.toString), Part(emitted), Part(a.chunkNames.mkString("[", ",", "]"))) + val emitted = if (a.emitted) "[emitted]" else "" + AssetLine(Part(a.name), Part(a.formattedSize), Part(emitted), Part(a.chunkNames.mkString("[", ",", "]"))) }.foldLeft(List(AssetLine.Zero)) { case (lines, curr) => val adj = lines.map(_.adjustPadding(curr)) @@ -91,17 +110,28 @@ object Stats { implicit val assetsReads: Reads[Asset] = ( (JsPath \ "name").read[String] and (JsPath \ "size").read[Long] and - (JsPath \ "emitted").readNullable[Boolean] and - (JsPath \\ "chunkNames").read[List[String]] + (JsPath \ "emitted").read[Boolean] and + (JsPath \ "chunkNames").read[List[String]] )(Asset.apply _) + implicit val errorReads: Reads[WebpackError] = ( + (JsPath \ "moduleName").read[String] and + (JsPath \ "message").read[String] and + (JsPath \ "loc").read[String] + )(WebpackError.apply _) + + implicit val warningReads: Reads[WebpackWarning] = ( + (JsPath \ "moduleName").read[String] and + (JsPath \ "message").read[String] + )(WebpackWarning.apply _) + implicit val statsReads: Reads[WebpackStats] = ( (JsPath \ "version").read[String] and (JsPath \ "hash").read[String] and (JsPath \ "time").read[Long] and (JsPath \ "outputPath").readNullable[String].map(x => x.map(new File(_).toPath)) and // It seems webpack 2 doesn't produce outputPath - (JsPath \ "errors").read[List[String]] and - (JsPath \ "warnings").read[List[String]] and + (JsPath \ "errors").read[List[WebpackError]] and + (JsPath \ "warnings").read[List[WebpackWarning]] and (JsPath \ "assets").read[List[Asset]] )(WebpackStats.apply _) diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Webpack.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Webpack.scala index a56b7e00..da50694f 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Webpack.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/Webpack.scala @@ -10,7 +10,7 @@ import Stats._ import scala.util.{Failure, Success, Try} object Webpack { - // Represents webpack 4 modes + // Represents webpack 5 modes sealed trait WebpackMode { def mode: String } @@ -61,95 +61,74 @@ object Webpack { webpackConfigFile: BundlerFile.WebpackConfig, libraryBundleName: Option[String], mode: WebpackMode, + devServerPort: Int, log: Logger ): Unit = { + val webpackConfigContent = generateConfigFile(emitSourceMaps, entry, webpackConfigFile, libraryBundleName, mode, + devServerPort) + log.info("Writing scalajs.webpack.config.js") - // Build the output configuration, configured for library output - // if a library bundle name is provided - val output = libraryBundleName match { - case Some(bundleName) => - JS.obj( - "path" -> JS.str(webpackConfigFile.targetDir.toAbsolutePath.toString), - "filename" -> JS.str(BundlerFile.Library.fileName("[name]")), - "library" -> JS.str(bundleName), - "libraryTarget" -> JS.str("var") - ) - case None => - JS.obj( - "path" -> JS.str(webpackConfigFile.targetDir.toAbsolutePath.toString), - "filename" -> JS.str(BundlerFile.ApplicationBundle.fileName("[name]")) - ) - } + IO.write(webpackConfigFile.file, webpackConfigContent.show) + } - // Build the file itself - val webpackConfigContent = - JS.ref("module").dot("exports").assign(JS.obj(Seq( - "entry" -> JS.obj( - entry.project -> JS.arr(JS.str(entry.file.absolutePath)) - ), - "output" -> output - ) ++ ( - if (emitSourceMaps) { - val webpackNpmPackage = NpmPackage.getForModule(webpackConfigFile.targetDir.toFile, "webpack") - webpackNpmPackage.flatMap(_.major) match { - case Some(1) => - Seq( - "devtool" -> JS.str("source-map"), - "module" -> JS.obj( - "preLoaders" -> JS.arr( - JS.obj( - "test" -> JS.regex("\\.js$"), - "loader" -> JS.str("source-map-loader") - ) - ) - ) - ) - case Some(2) => - Seq( - "devtool" -> JS.str("source-map"), - "module" -> JS.obj( - "rules" -> JS.arr( - JS.obj( - "test" -> JS.regex("\\.js$"), - "enforce" -> JS.str("pre"), - "loader" -> JS.str("source-map-loader") - ) - ) - ) - ) - case Some(3) => - Seq( - "devtool" -> JS.str("source-map"), - "module" -> JS.obj( - "rules" -> JS.arr( - JS.obj( - "test" -> JS.regex("\\.js$"), - "enforce" -> JS.str("pre"), - "use" -> JS.arr(JS.str("source-map-loader")) - ) - ) - ) - ) - case Some(4) => - Seq( - "mode" -> JS.str(mode.mode), - "devtool" -> JS.str("source-map"), - "module" -> JS.obj( - "rules" -> JS.arr( - JS.obj( - "test" -> JS.regex("\\.js$"), - "enforce" -> JS.str("pre"), - "use" -> JS.arr(JS.str("source-map-loader")) - ) + private def generateConfigFile( + emitSourceMaps: Boolean, + entry: BundlerFile.WebpackInput, + webpackConfigFile: BundlerFile.WebpackConfig, + libraryBundleName: Option[String], + mode: WebpackMode, + devServerPort: Int + ): JS = { + val webpackNpmPackage = NpmPackage.getForModule(webpackConfigFile.targetDir.toFile, "webpack") + webpackNpmPackage.flatMap(_.major) match { + case Some(5) => + // Build the output configuration, configured for library output + // if a library bundle name is provided + val output = libraryBundleName match { + case Some(bundleName) => + JS.obj( + "path" -> JS.str(webpackConfigFile.targetDir.toAbsolutePath.toString), + "filename" -> JS.str(BundlerFile.Library.fileName("[name]")), + "library" -> JS.str(bundleName), + "libraryTarget" -> JS.str("var") + ) + case None => + JS.obj( + "path" -> JS.str(webpackConfigFile.targetDir.toAbsolutePath.toString), + "filename" -> JS.str(BundlerFile.ApplicationBundle.fileName("[name]")) + ) + } + + JS.ref("module").dot("exports").assign(JS.obj(Seq( + "entry" -> JS.obj( + entry.project -> JS.arr(JS.str(entry.file.absolutePath)) + ), + "output" -> output, + "mode" -> JS.str(mode.mode), + "devServer" -> JS.obj("port" -> JS.int(devServerPort)), + ) ++ ( + if (emitSourceMaps) { + Seq( + "devtool" -> JS.str("source-map"), + "module" -> JS.obj( + "rules" -> JS.arr( + JS.obj( + "test" -> JS.regex("\\.js$"), + "enforce" -> JS.str("pre"), + "use" -> JS.arr(JS.str("source-map-loader")) ) ) ) - case Some(x) => sys.error(s"Unsupported webpack major version $x") - case None => sys.error("No webpack version defined") - } - } else Nil - ): _*)) - IO.write(webpackConfigFile.file, webpackConfigContent.show) + ) + } else Nil + ): _*)) + + case Some(x) => + sys.error(s"Unsupported webpack major version $x") + + case None => + sys.error("No webpack version defined") + } } /** @@ -162,7 +141,8 @@ object Webpack { * @param entry Scala.js application to bundle * @param targetDir Target directory (and working directory for Nodejs) * @param extraArgs Extra arguments passed to webpack - * @param mode Mode for webpack 4 + * @param mode Mode for webpack 5 + * @param devServerPort Port used by webpack-dev-server * @param log Logger * @return The generated bundles */ @@ -176,9 +156,10 @@ object Webpack { extraArgs: Seq[String], nodeArgs: Seq[String], mode: WebpackMode, + devServerPort: Int, log: Logger ): BundlerFile.ApplicationBundle = { - writeConfigFile(emitSourceMaps, entry, generatedWebpackConfigFile, None, mode, log) + writeConfigFile(emitSourceMaps, entry, generatedWebpackConfigFile, None, mode, devServerPort, log) val configFile = customWebpackConfigFile .map(Webpack.copyCustomWebpackConfigFiles(targetDir, webpackResources)) @@ -206,7 +187,7 @@ object Webpack { * @param entryPointFile The entrypoint file to bundle dependencies for * @param libraryModuleName The library module name to assign the webpack bundle to * @param extraArgs Extra arguments passed to webpack - * @param mode Mode for webpack 4 + * @param mode Mode for webpack 5 * @param log Logger * @return The generated bundle */ @@ -220,6 +201,7 @@ object Webpack { extraArgs: Seq[String], nodeArgs: Seq[String], mode: WebpackMode, + devServerPort: Int, log: Logger ): BundlerFile.Library = { writeConfigFile( @@ -228,6 +210,7 @@ object Webpack { generatedWebpackConfigFile, Some(libraryModuleName), mode, + devServerPort, log ) @@ -260,8 +243,16 @@ object Webpack { if (p.warnings.nonEmpty || p.errors.nonEmpty) { logger.info("") // Filtering is a workaround for #111 - p.warnings.filterNot(_.contains("https://raw.githubusercontent.com")).foreach(x => logger.warn(x)) - p.errors.foreach(x => logger.error(x)) + p.warnings.filterNot(_.message.contains("https://raw.githubusercontent.com")).foreach { warning => + logger.warn(s"WARNING in ${warning.moduleName}") + logger.warn(warning.message) + logger.warn("\n") + } + p.errors.foreach { error => + logger.error(s"ERROR in ${error.moduleName} ${error.loc}") + logger.error(error.message) + logger.error("\n") + } } Some(p) } @@ -290,7 +281,7 @@ object Webpack { */ def run(nodeArgs: String*)(args: String*)(workingDir: File, log: Logger): Option[WebpackStats] = { val webpackBin = workingDir / "node_modules" / "webpack" / "bin" / "webpack" - val params = nodeArgs ++ Seq(webpackBin.absolutePath, "--bail", "--profile", "--json") ++ args + val params = nodeArgs ++ Seq(webpackBin.absolutePath, "--profile", "--json") ++ args val cmd = "node" +: params Commands.run(cmd, workingDir, log, jsonOutput(cmd, log)).fold(sys.error, _.flatten) } diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/WebpackDevServer.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/WebpackDevServer.scala index 39fbf494..a6a8cb56 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/WebpackDevServer.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/WebpackDevServer.scala @@ -13,7 +13,6 @@ private [scalajsbundler] class WebpackDevServer { /** * @param workDir - path to working directory for webpack-dev-server * @param configPath - path to webpack config. - * @param port - port, on which the server will operate. * @param extraArgs - additional arguments for webpack-dev-server. * @param logger - a logger to use for output * @param globalLogger - a global logger to use for output even when the task is terminated @@ -21,7 +20,6 @@ private [scalajsbundler] class WebpackDevServer { def start( workDir: File, configPath: File, - port: Int, extraArgs: Seq[String], logger: Logger, globalLogger: Logger, @@ -30,7 +28,6 @@ private [scalajsbundler] class WebpackDevServer { worker = Some(new Worker( workDir, configPath, - port, extraArgs, logger, globalLogger @@ -47,7 +44,6 @@ private [scalajsbundler] class WebpackDevServer { private class Worker( workDir: File, configPath: File, - port: Int, extraArgs: Seq[String], logger: Logger, globalLogger: Logger, @@ -56,11 +52,10 @@ private [scalajsbundler] class WebpackDevServer { val command = Seq( "node", - "node_modules/webpack-dev-server/bin/webpack-dev-server.js", + "node_modules/webpack/bin/webpack", + "serve", "--config", - configPath.getAbsolutePath, - "--port", - port.toString + configPath.getAbsolutePath ) ++ extraArgs val process = util.Commands.start(command, workDir, globalLogger) diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/LibraryTasks.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/LibraryTasks.scala index c2659f1c..307eb199 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/LibraryTasks.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/LibraryTasks.scala @@ -53,6 +53,7 @@ object LibraryTasks { val nodeArgs = (webpackNodeArgs in stage).value val webpackMode = Webpack.WebpackMode.fromBooleanProductionMode((scalaJSLinkerConfig in stage).value.semantics.productionMode) + val devServerPort = webpackDevServerPort.value val cachedActionFunction = FileFunction.cached( @@ -71,6 +72,7 @@ object LibraryTasks { extraArgs, nodeArgs, webpackMode, + devServerPort, log ).cached } diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/ScalaJSBundlerPlugin.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/ScalaJSBundlerPlugin.scala index d0c0eba5..fdda11e5 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/ScalaJSBundlerPlugin.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/ScalaJSBundlerPlugin.scala @@ -553,11 +553,11 @@ object ScalaJSBundlerPlugin extends AutoPlugin { scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) }, - version in webpack := "4.32.2", + version in webpack := "5.24.3", - webpackCliVersion := "3.3.2", + webpackCliVersion := "4.5.0", - version in startWebpackDevServer := "3.4.1", + version in startWebpackDevServer := "3.11.2", version in installJsdom := "9.9.0", @@ -764,7 +764,6 @@ object ScalaJSBundlerPlugin extends AutoPlugin { // webpack-dev-server wiring startWebpackDevServer in stageTask := Def.task { - val port = (webpackDevServerPort in stageTask).value val extraArgs = (webpackDevServerExtraArgs in stageTask).value // This duplicates file layout logic from `Webpack` @@ -787,7 +786,6 @@ object ScalaJSBundlerPlugin extends AutoPlugin { server.start( workDir, config, - port, extraArgs, logger, globalLogger diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/Settings.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/Settings.scala index ed0ee5b4..1a92bdf5 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/Settings.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/Settings.scala @@ -119,13 +119,11 @@ private[sbtplugin] object Settings { // Replace the path to the `main` module by the path to the legacy key output optMainModulePath match { case Some(mainModulePath) => - prev.map { inputItem => - inputItem match { - case CommonJSModule(module) if module == mainModulePath => - CommonJSModule(legacyKeyOutput.data.toPath()) - case _ => - inputItem - } + prev.map { + case CommonJSModule(module) if module == mainModulePath => + CommonJSModule(legacyKeyOutput.data.toPath()) + case inputItem => + inputItem } case None => prev @@ -183,24 +181,30 @@ private[sbtplugin] object Settings { val loader = targetDir / s"$sjsOutputName-loader.js" JsDomTestEntries.writeLoader(sjsOutput, loader) - customWebpackConfigFile match { + val configArgs = customWebpackConfigFile match { case Some(configFile) => val customConfigFileCopy = Webpack.copyCustomWebpackConfigFiles(targetDir, webpackResources.value.get)(configFile) - NpmPackage(webpackVersion).major match { - case Some(4) => - // TODO: It assumes tests are run on development mode. It should instead use build settings - Webpack.run(nodeArgs: _*)("--mode", "development", "--config", customConfigFileCopy.getAbsolutePath, loader.absolutePath, "--output", bundle.absolutePath)(targetDir, logger) - case _ => - Webpack.run(nodeArgs: _*)("--config", customConfigFileCopy.getAbsolutePath, loader.absolutePath, bundle.absolutePath)(targetDir, logger) - } + Seq("--config", customConfigFileCopy.getAbsolutePath) + + case None => + Seq.empty + } + + // TODO: It assumes tests are run on development mode. It should instead use build settings + val allArgs = Seq( + "--mode", "development", + "--entry", loader.absolutePath, + "--output-path", bundle.getParentFile.absolutePath, + "--output-filename", bundle.name + ) ++ configArgs + + NpmPackage(webpackVersion).major match { + case Some(5) => + Webpack.run(nodeArgs: _*)(allArgs: _*)(targetDir, logger) + case Some(x) => + sys.error(s"Unsupported webpack major version $x") case None => - NpmPackage(webpackVersion).major match { - case Some(4) => - // TODO: It assumes tests are run on development mode. It should instead use build settings - Webpack.run(nodeArgs: _*)("--mode", "development", loader.absolutePath, "--output", bundle.absolutePath)(targetDir, logger) - case _ => - Webpack.run(nodeArgs: _*)(loader.absolutePath, bundle.absolutePath)(targetDir, logger) - } + sys.error("No webpack version defined") } Set.empty @@ -216,13 +220,11 @@ private[sbtplugin] object Settings { optBundle match { case Some(bundle) => - prev.map { inputItem => - inputItem match { - case CommonJSModule(module) if module == sjsOutput.toPath() => - bundle - case _ => - inputItem - } + prev.map { + case CommonJSModule(module) if module == sjsOutput.toPath() => + bundle + case inputItem => + inputItem } case None => prev diff --git a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/WebpackTasks.scala b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/WebpackTasks.scala index 5674307a..665589a4 100644 --- a/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/WebpackTasks.scala +++ b/sbt-scalajs-bundler/src/main/scala/scalajsbundler/sbtplugin/WebpackTasks.scala @@ -33,6 +33,7 @@ object WebpackTasks { val nodeArgs = (webpackNodeArgs in stage).value val webpackMode = Webpack.WebpackMode.fromBooleanProductionMode((scalaJSLinkerConfig in stage).value.semantics.productionMode) + val devServerPort = webpackDevServerPort.value val cachedActionFunction = FileFunction.cached( @@ -49,6 +50,7 @@ object WebpackTasks { extraArgs, nodeArgs, webpackMode, + devServerPort, log ).cached } diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/custom-test-config/build.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/custom-test-config/build.sbt index d85c0e25..13a4e1b8 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/custom-test-config/build.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/custom-test-config/build.sbt @@ -27,8 +27,6 @@ webpackBundlingMode := BundlingMode.LibraryAndApplication() useYarn := true -version in webpack := "4.32.2" - npmDependencies in Compile ++= Seq( "react" -> reactJS, "react-dom" -> reactJS diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/build.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/build.sbt index af6ad46a..e3e58a59 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/build.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/build.sbt @@ -9,13 +9,13 @@ scalaJSUseMainModuleInitializer := true //#relevant-settings npmDependencies in Compile ++= Seq( - "moment" -> "2.18.1" + "moment" -> "2.29.1" ) npmDevDependencies in Compile ++= Seq( - "webpack-merge" -> "4.1.2", - "imports-loader" -> "0.8.0", - "expose-loader" -> "0.7.5" + "webpack-merge" -> "5.7.3", + "imports-loader" -> "2.0.0", + "expose-loader" -> "2.0.0" ) webpackConfigFile in fastOptJS := Some(baseDirectory.value / "dev.webpack.config.js") diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/common.webpack.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/common.webpack.config.js index b064df78..7926a535 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/common.webpack.config.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/common.webpack.config.js @@ -6,19 +6,27 @@ const importRule = { // Force require global modules test: /.*-(fast|full)opt\.js$/, loader: - "imports-loader?" + - Object.keys(globalModules) + "imports-loader", + options: { + type: 'commonjs', + imports: Object.keys(globalModules) .map(function(modName) { - return modName + "=" + globalModules[modName]; + return { + moduleName: globalModules[modName], + name: modName, + } }) - .join(",") + } }; const exposeRules = Object.keys(globalModules).map(function(modName) { // Expose global modules return { test: require.resolve(modName), - loader: "expose-loader?" + globalModules[modName] + loader: "expose-loader", + options: { + exposes: [globalModules[modName]], + }, }; }); diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/dev.webpack.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/dev.webpack.config.js index 4daf5060..f6f019b6 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/dev.webpack.config.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/dev.webpack.config.js @@ -1,6 +1,6 @@ -var merge = require('webpack-merge'); +var { merge } = require('webpack-merge'); var commonConfig = require('./common.webpack.config'); var generatedConfig = require('./scalajs.webpack.config'); -module.exports = merge(generatedConfig, commonConfig); \ No newline at end of file +module.exports = merge(generatedConfig, commonConfig); diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/test.webpack.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/test.webpack.config.js index 826b0c74..7ff41d93 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/test.webpack.config.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/test.webpack.config.js @@ -1,5 +1,5 @@ - var merge = require('webpack-merge'); +var { merge } = require('webpack-merge'); - var commonConfig = require('./common.webpack.config'); +var commonConfig = require('./common.webpack.config'); - module.exports = merge(commonConfig, {}); \ No newline at end of file +module.exports = merge(commonConfig, {}); diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/library/project/plugins.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/library/project/plugins.sbt index a3dd2708..66144af2 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/library/project/plugins.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/library/project/plugins.sbt @@ -5,6 +5,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % scalaJSBundlerVersion) -libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.23" +libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.46.0" ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/build.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/build.sbt index d4f5d0d5..d4d2b773 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/build.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/build.sbt @@ -11,17 +11,13 @@ libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "1.0.0" npmDependencies in Compile += "leaflet" -> "0.7.7" -version in webpack := "4.1.1" - -version in startWebpackDevServer := "3.1.1" - npmDevDependencies in Compile ++= Seq( "webpack-merge" -> "4.1.2", - "file-loader" -> "1.1.11", - "image-webpack-loader" -> "4.1.0", - "css-loader" -> "0.28.10", - "style-loader" -> "0.20.2", - "url-loader" -> "1.0.1" + "file-loader" -> "6.2.0", + "image-webpack-loader" -> "7.0.1", + "css-loader" -> "5.0.1", + "style-loader" -> "2.0.0", + "url-loader" -> "4.1.0" ) webpackConfigFile in fastOptJS := Some(baseDirectory.value / "dev.webpack.config.js") diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/common.webpack.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/common.webpack.config.js index ab83338b..83601121 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/common.webpack.config.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/common.webpack.config.js @@ -43,8 +43,5 @@ module.exports = { } } ] - }, - node: { - fs: "empty" } }; diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/prod.webpack.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/prod.webpack.config.js index 78020d8e..eebd5e6e 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/prod.webpack.config.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/prod.webpack.config.js @@ -1,14 +1,6 @@ -var webpack = require("webpack"); var merge = require("webpack-merge"); var generatedConfig = require("./scalajs.webpack.config"); var commonConfig = require("./common.webpack.config.js"); -var UglifyJsPlugin = require("uglifyjs-webpack-plugin"); -module.exports = merge(generatedConfig, commonConfig, { - plugins: [ - new UglifyJsPlugin({ - sourceMap: true - }) - ] -}); +module.exports = merge(generatedConfig, commonConfig); \ No newline at end of file diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/project/plugins.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/project/plugins.sbt index a3dd2708..66144af2 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/project/plugins.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig/project/plugins.sbt @@ -5,6 +5,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % scalaJSBundlerVersion) -libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.23" +libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.46.0" ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/README.md b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/README.md index a08b7f9e..efbf24a1 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/README.md +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/README.md @@ -5,5 +5,4 @@ An application that uses npm packages and that produces a static HTML page. Demonstrates how to: -- depend on npm packages ; -- differentiate prod/dev builds. +- depend on npm packages. diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/build.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/build.sbt index 6d907e2a..5498802e 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/build.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/build.sbt @@ -10,11 +10,6 @@ libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "1.0.0" npmDependencies in Compile += "snabbdom" -> "0.5.3" -npmDevDependencies in Compile += "uglifyjs-webpack-plugin" -> "1.2.2" - -// Use a different Webpack configuration file for production -webpackConfigFile in fullOptJS := Some(baseDirectory.value / "prod.webpack.config.js") - // Execute the tests in browser-like environment requireJsDomEnv in Test := true diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/prod.webpack.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/prod.webpack.config.js deleted file mode 100644 index 8f14d075..00000000 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/prod.webpack.config.js +++ /dev/null @@ -1,7 +0,0 @@ -var UglifyJsPlugin = require("uglifyjs-webpack-plugin"); - -module.exports = require("./scalajs.webpack.config"); - -module.exports.plugins = (module.exports.plugins || []).concat([ - new UglifyJsPlugin({ sourceMap: module.exports.devtool === "source-map" }) -]); diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/project/plugins.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/project/plugins.sbt index a3dd2708..66144af2 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/project/plugins.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/project/plugins.sbt @@ -5,6 +5,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % scalaJSBundlerVersion) -libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.23" +libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.46.0" ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets-cookbook/build.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets-cookbook/build.sbt index 9994c38a..fc13e075 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets-cookbook/build.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets-cookbook/build.sbt @@ -52,7 +52,6 @@ TaskKey[Unit]("checkArchive") := { "assets/webpack-assets-opt-bundle.js", "assets/webpack-assets-opt-loader.js", "assets/webpack-assets-opt-library.js", - "assets/webpack-assets-opt-library.js.map", "assets/webpack-assets-opt.js", "assets/react.production.min.js", "assets/react-dom.production.min.js" diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig1.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig1.js index 8c7bbd2d..a05d8d9b 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig1.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig1.js @@ -1,11 +1,10 @@ const ScalaJS = require("./scalajs.webpack.config"); -const Merge = require("webpack-merge"); +const { merge } = require("webpack-merge"); const HtmlWebpackPlugin = require("html-webpack-plugin"); // LessLoader is requested but it is missing from npmDevDependencies const LessLoaderPlugin = require("less-loader"); -const WebApp = Merge(ScalaJS, { - mode: "development", +const WebApp = merge(ScalaJS, { output: { filename: "library.js" }, diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig2.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig2.js index 0edacd7f..9e4b89a4 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig2.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/badconfig2.js @@ -1,12 +1,11 @@ const ScalaJS = require("./scalajs.webpack.config"); -const Merge = require("webpack-merge"); +const { merge } = require("webpack-merge"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const path = require("path"); const rootDir = path.resolve(__dirname, "../../../.."); const resourcesDir = path.resolve(rootDir, "src/main/resources"); -const WebApp = Merge(ScalaJS, { - mode: "development", +const WebApp = merge(ScalaJS, { entry: { app: [path.resolve(resourcesDir, "./entry.js")] }, diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/build.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/build.sbt index 345dab2b..3d57c472 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/build.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/build.sbt @@ -19,24 +19,20 @@ webpackBundlingMode in fullOptJS := BundlingMode.Application webpackConfigFile in fullOptJS := Some(baseDirectory.value / "prod.config.js") -npmDevDependencies in Compile += "html-webpack-plugin" -> "4.3.0" +npmDevDependencies in Compile += "html-webpack-plugin" -> "5.2.0" -npmDevDependencies in Compile += "webpack-merge" -> "4.2.2" +npmDevDependencies in Compile += "webpack-merge" -> "5.7.3" -npmDevDependencies in Compile += "style-loader" -> "1.2.1" +npmDevDependencies in Compile += "style-loader" -> "2.0.0" -npmDevDependencies in Compile += "css-loader" -> "3.5.3" +npmDevDependencies in Compile += "css-loader" -> "5.0.1" -npmDevDependencies in Compile += "mini-css-extract-plugin" -> "0.9.0" +npmDevDependencies in Compile += "mini-css-extract-plugin" -> "1.3.4" webpackDevServerPort := 7357 useYarn := true -version in webpack := "4.43.0" - -version in startWebpackDevServer := "3.11.0" - // HtmlUnit does not support ECMAScript 2015 scalaJSLinkerConfig ~= { _.withESFeatures(_.withUseECMAScript2015(false)) } @@ -51,10 +47,14 @@ InputKey[Unit]("html") := { assert(files.length == assetsCount) // Check all files are present assert(files.map(_.data.exists).forall(_ == true)) + // There is only one app file + assert(files.count(_.metadata.get(BundlerFileTypeAttr) == Some(BundlerFileType.Application)) == 1) // There is only one library file assert(files.count(_.metadata.get(BundlerFileTypeAttr) == Some(BundlerFileType.Library)) == 1) - // And 2 assets, the css and its map - assert(files.count(_.metadata.get(BundlerFileTypeAttr) == Some(BundlerFileType.Asset)) == 2) + // There is only one library file + assert(files.count(_.metadata.get(BundlerFileTypeAttr) == Some(BundlerFileType.Loader)) == 1) + // And 1 asset (HTML file) + assert(files.count(_.metadata.get(BundlerFileTypeAttr) == Some(BundlerFileType.Asset)) == 1) // The application is the first assert(files.head.metadata.get(BundlerFileTypeAttr) == Some(BundlerFileType.Application)) val client = new WebClient() diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/dev.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/dev.config.js index 4ad445f5..15c4950d 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/dev.config.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/dev.config.js @@ -1,9 +1,8 @@ const ScalaJS = require("./scalajs.webpack.config"); -const Merge = require("webpack-merge"); +const { merge } = require("webpack-merge"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -const WebApp = Merge(ScalaJS, { - mode: "development", +const WebApp = merge(ScalaJS, { output: { filename: "library.js" }, diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/prod.config.js b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/prod.config.js index f3e116f8..b4931699 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/prod.config.js +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/prod.config.js @@ -1,5 +1,5 @@ const ScalaJS = require("./scalajs.webpack.config"); -const Merge = require("webpack-merge"); +const { merge } = require("webpack-merge"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); @@ -7,8 +7,7 @@ const path = require("path"); const rootDir = path.resolve(__dirname, "../../../.."); const resourcesDir = path.resolve(rootDir, "src/main/resources"); -const WebApp = Merge(ScalaJS, { - mode: "production", +const WebApp = merge(ScalaJS, { entry: { app: [path.resolve(resourcesDir, "./entry.js")] }, @@ -16,7 +15,7 @@ const WebApp = Merge(ScalaJS, { rules: [ { test: /\.css$/, - use: ["style-loader", MiniCssExtractPlugin.loader, "css-loader"] + use: [MiniCssExtractPlugin.loader, "css-loader"] } ] }, diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/project/plugins.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/project/plugins.sbt index 4d5b93e1..66144af2 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/project/plugins.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/project/plugins.sbt @@ -5,6 +5,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % scalaJSBundlerVersion) -libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.40.0" +libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.46.0" ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/test b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/test index 4005af8d..a6e32051 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/test +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-assets/test @@ -1,12 +1,12 @@ # the server should properly start > fastOptJS::webpack -# 3 assets and 2 for loader and entry -> html index.html 5 +# 1 assets and 3 for library, loader and app +> html index.html 4 > clean # Now let's try optimized > fullOptJS::webpack -> htmlProd index.html demo 7 +> htmlProd index.html demo 4 # Error case 1 > set webpackConfigFile in fastOptJS := Some(new File("badconfig1.js")) diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/build.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/build.sbt index a1c471ee..24e22cd6 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/build.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/build.sbt @@ -12,12 +12,10 @@ scalaJSUseMainModuleInitializer := true // Use a custom config file webpackConfigFile := Some(baseDirectory.value / "webpack.config.js") -(npmDevDependencies in Compile) += ("html-webpack-plugin" -> "4.3.0") +(npmDevDependencies in Compile) += ("html-webpack-plugin" -> "5.2.0") webpackDevServerPort := 7357 -version in webpack := "4.32.2" - // HtmlUnit does not support ECMAScript 2015 scalaJSLinkerConfig ~= { _.withESFeatures(_.withUseECMAScript2015(false)) } diff --git a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/project/plugins.sbt b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/project/plugins.sbt index 4d5b93e1..66144af2 100644 --- a/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/project/plugins.sbt +++ b/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/webpack-dev-server/project/plugins.sbt @@ -5,6 +5,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % scalaJSBundlerVersion) -libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.40.0" +libraryDependencies += "net.sourceforge.htmlunit" % "htmlunit" % "2.46.0" ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet