diff --git a/build.sbt b/build.sbt index 517c9f9..b403357 100644 --- a/build.sbt +++ b/build.sbt @@ -39,8 +39,6 @@ libraryDependencies ++= Seq( Compile / npmDependencies ++= Seq( "jquery" -> "3.3.1", - "popper.js" -> "1.16.1", - // // "@popperjs/core" -> "2.6.0", "blk-design-system" -> "1.0.2", "bootstrap" -> "4.5.3", "@types/chart.js" -> "2.9.11", @@ -110,6 +108,9 @@ webpackDevServerPort := 8080 webpackConfigFile in fastOptJS := Some( baseDirectory.value / "webpack.config.dev.js" ) +webpackConfigFile in fullOptJS := Some( + baseDirectory.value / "webpack.config.prod.js" +) // webpackConfigFile in fullOptJS := Some( // baseDirectory.value / "webpack.config.js" // ) diff --git a/webpack.config.common.js b/webpack.config.common.js new file mode 100644 index 0000000..268bac7 --- /dev/null +++ b/webpack.config.common.js @@ -0,0 +1,25 @@ +var webpack = require('webpack'); +var merge = require('webpack-merge'); +var generated = require('./scalajs.webpack.config'); +var Path = require('path'); + +var local = { + module: { + rules: [ + { + test: /\.css$/, + use: ['style-loader', 'css-loader'] + }, + { + test: /\.(ttf|eot|woff|png|glb|jpeg|jpg|mp4|jsn)$/, + use: 'file-loader' + }, + { + test: /\.(eot)$/, + use: 'url-loader' + } + ] + }, +}; + +module.exports = merge(generated, local); diff --git a/webpack.config.dev.js b/webpack.config.dev.js index dcb9cf1..6da25b8 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -1,26 +1,10 @@ var webpack = require('webpack'); var merge = require('webpack-merge'); -var generated = require('./scalajs.webpack.config'); +var common = require('./webpack.config.common.js'); var Path = require('path'); const rootDir = Path.resolve(__dirname, '../../../..'); var local = { - module: { - rules: [ - { - test: /\.css$/, - use: ['style-loader', 'css-loader'] - }, - { - test: /\.(ttf|eot|woff|png|glb|jpeg|jpg|mp4|jsn)$/, - use: 'file-loader' - }, - { - test: /\.(eot)$/, - use: 'url-loader' - } - ] - }, devServer: { contentBase: [ Path.resolve(__dirname, 'dev'), // fastOptJS output @@ -35,12 +19,6 @@ var local = { ignored: ["node_modules"] } }, - plugins: [ - new webpack.ProvidePlugin({ - $: 'jquery/src/jquery', - jquery: 'jquery/src/jquery' - }) - ] }; -module.exports = merge(generated, local); +module.exports = merge(common, local); diff --git a/webpack.config.prod.js b/webpack.config.prod.js new file mode 100644 index 0000000..9c31d89 --- /dev/null +++ b/webpack.config.prod.js @@ -0,0 +1,8 @@ +var webpack = require('webpack'); +var merge = require('webpack-merge'); +var common = require('./webpack.config.common.js'); +var Path = require('path'); + +var local = {}; + +module.exports = merge(common, local); diff --git a/yarn.lock b/yarn.lock index 464614e..86fe9d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2942,11 +2942,6 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" -popper.js@1.16.1: - version "1.16.1" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" - integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== - portfinder@^1.0.26: version "1.0.28" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" @@ -3870,6 +3865,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@4: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"