fix(admin,admin-ui): copy public folder as part of admin build (#5057)
**What** - Copies `/public` folder into Admin build - Updates the version of `dotenv` to match the version used in other Medusa dependencies. This will prevent errors when trying to link the `admin` package into a local repository for testing.
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
"chokidar": "^3.5.3",
|
||||
"clsx": "^1.2.1",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"css-loader": "^6.8.1",
|
||||
"emoji-picker-react": "^4.4.3",
|
||||
"framer-motion": "^9.1.6",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import ReactRefreshPlugin from "@pmmmwh/react-refresh-webpack-plugin"
|
||||
import CopyPlugin from "copy-webpack-plugin"
|
||||
import HtmlWebpackPlugin from "html-webpack-plugin"
|
||||
import MiniCssExtractPlugin from "mini-css-extract-plugin"
|
||||
import path from "node:path"
|
||||
@@ -177,6 +178,15 @@ export function getWebpackConfig({
|
||||
|
||||
new webpack.DefinePlugin(envVars),
|
||||
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: path.resolve(__dirname, "..", "ui", "public"),
|
||||
to: path.resolve(dest, "public"),
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
!isProd && new ReactRefreshPlugin(),
|
||||
|
||||
...webpackPlugins,
|
||||
|
||||
Reference in New Issue
Block a user