From 5d56a48d401ed34f1541471aba617f7949ba6113 Mon Sep 17 00:00:00 2001 From: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:46:52 +0900 Subject: [PATCH] =?UTF-8?q?`builtins.define`=E3=82=92`rspack.DefinePlugin`?= =?UTF-8?q?=E3=81=AB=E7=A7=BB=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rspack.config.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rspack.config.js b/rspack.config.js index e459dd1..d3b498d 100644 --- a/rspack.config.js +++ b/rspack.config.js @@ -28,14 +28,12 @@ const config = { ], }, devServer: { static: { directory: "./dist/" } }, - builtins: { - define: { + plugins: [ + new rspack.DefinePlugin({ "process.env.SERVER_URL": JSON.stringify(process.env.SERVER_URL), "process.env.BUILD_DATE": JSON.stringify(buildDate), "process.env.CREDITS": JSON.stringify(process.env.CREDITS), - }, - }, - plugins: [ + }), new rspack.ProvidePlugin({ process: [require.resolve("process/browser")], }),