diff --git a/Procfile b/Procfile index e68a73938..4c6589309 100644 --- a/Procfile +++ b/Procfile @@ -1,4 +1,4 @@ web: bundle exec rails server puma -p $PORT worker: bundle exec sidekiq -C ./config/sidekiq.yml -wp-client: bin/webpack-dev-server -wp-server: SERVER_BUNDLE_ONLY=yes bin/webpack --watch +wp-client: bin/webpacker-dev-server +wp-server: SERVER_BUNDLE_ONLY=yes bin/webpacker --watch diff --git a/babel.config.js b/babel.config.js index 3157cfe20..29e7b0ed0 100644 --- a/babel.config.js +++ b/babel.config.js @@ -20,10 +20,7 @@ module.exports = function (api) { const changesOnDefault = { presets: [ - isTestEnv && [ - '@babel/preset-react' - ], - (isProductionEnv || isDevelopmentEnv) && [ + [ '@babel/preset-react', { development: isDevelopmentEnv || isTestEnv, diff --git a/bin/webpack b/bin/webpack deleted file mode 100755 index 1031168d0..000000000 --- a/bin/webpack +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" -ENV["NODE_ENV"] ||= "development" - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require "bundler/setup" - -require "webpacker" -require "webpacker/webpack_runner" - -APP_ROOT = File.expand_path("..", __dir__) -Dir.chdir(APP_ROOT) do - Webpacker::WebpackRunner.run(ARGV) -end diff --git a/bin/webpack-dev-server b/bin/webpack-dev-server deleted file mode 100755 index dd9662737..000000000 --- a/bin/webpack-dev-server +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" -ENV["NODE_ENV"] ||= "development" - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require "bundler/setup" - -require "webpacker" -require "webpacker/dev_server_runner" - -APP_ROOT = File.expand_path("..", __dir__) -Dir.chdir(APP_ROOT) do - Webpacker::DevServerRunner.run(ARGV) -end diff --git a/package.json b/package.json index 0eb3f1aa5..f5f30b33d 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@babel/preset-env": "7", "@babel/preset-react": "^7.12.1", "@babel/preset-typescript": "^7.16.7", - "@babel/runtime": "7", + "@babel/runtime": "^7.17.2", "@claviska/jquery-minicolors": "^2.3.5", "@fortawesome/fontawesome-free": "5.14.0", "@lyracom/embedded-form-glue": "^0.3.3", @@ -87,7 +87,7 @@ "angular-xeditable": "0.10", "auto-ngtemplate-loader": "^3.1.0", "axios": "^0.21.2", - "babel-loader": "8", + "babel-loader": "^8.2.3", "babel-plugin-macros": "^3.1.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "bootstrap-sass": "3.4.1", @@ -143,7 +143,8 @@ "webpack": "5", "webpack-assets-manifest": "5", "webpack-cli": "4", - "webpack-merge": "5" + "webpack-merge": "5", + "webpack-sources": "^3.2.3" }, "babel": { "presets": [ diff --git a/yarn.lock b/yarn.lock index 0a9f9809b..3be13331e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1139,13 +1139,6 @@ "@babel/helper-validator-option" "^7.16.7" "@babel/plugin-transform-typescript" "^7.16.7" -"@babel/runtime@7", "@babel/runtime@^7.12.5": - version "7.17.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" - integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/runtime@^7.12.0", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": version "7.14.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.6.tgz#535203bc0892efc7dec60bdc27b2ecf6e409062d" @@ -1153,6 +1146,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.12.5", "@babel/runtime@^7.17.2": + version "7.17.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" + integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" @@ -2244,7 +2244,7 @@ axios@^0.21.2: dependencies: follow-redirects "^1.14.0" -babel-loader@8: +babel-loader@^8.2.3: version "8.2.3" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.3.tgz#8986b40f1a64cacfcb4b8429320085ef68b1342d" integrity sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==