From 68c06b714d0e0e2b2ef92a1b4f4b19fe98aa595b Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 27 Jan 2024 02:27:07 +0000 Subject: [PATCH] Add test configuration file to webpack --- bin/webpack | 2 +- config/webpack/test.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 config/webpack/test.js diff --git a/bin/webpack b/bin/webpack index 008ecb22f7c..14ed741a787 100755 --- a/bin/webpack +++ b/bin/webpack @@ -1,7 +1,7 @@ #!/usr/bin/env ruby ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" -ENV["NODE_ENV"] ||= "development" +ENV["NODE_ENV"] ||= ENV["RAILS_ENV"] require "pathname" ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", diff --git a/config/webpack/test.js b/config/webpack/test.js new file mode 100644 index 00000000000..397a221905f --- /dev/null +++ b/config/webpack/test.js @@ -0,0 +1,8 @@ +const { merge } = require('webpack-merge'); + +const sharedConfig = require('./shared'); + +module.exports = merge(sharedConfig, { + mode: 'development', + cache: false, +});