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:
Kasper Fabricius Kristensen
2023-09-15 11:47:11 +02:00
committed by GitHub
parent 60360d2fd2
commit cb67760f71
5 changed files with 66 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
---
"@medusajs/admin-ui": patch
"@medusajs/admin": patch
---
fix(admin,admin-ui): Copy `/public` folder to admin build folder during build, in order for the build to include translation files. Also bumps the version of `dotenv` to match the version used in other Medusa dependencies.

View File

@@ -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",

View File

@@ -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,

View File

@@ -37,7 +37,7 @@
"@rollup/plugin-replace": "5.0.2",
"@rollup/plugin-virtual": "^3.0.1",
"commander": "^10.0.0",
"dotenv": "16.0.3",
"dotenv": "16.3.1",
"esbuild": "0.17.18",
"express": "4.18.2",
"fs-extra": "11.1.0",

View File

@@ -6260,6 +6260,7 @@ __metadata:
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
duplicate-dependencies-webpack-plugin: ^1.0.2
emoji-picker-react: ^4.4.3
@@ -6340,7 +6341,7 @@ __metadata:
"@rollup/plugin-virtual": ^3.0.1
"@types/express": ^4.17.13
commander: ^10.0.0
dotenv: 16.0.3
dotenv: 16.3.1
esbuild: 0.17.18
express: 4.18.2
fs-extra: 11.1.0
@@ -19234,6 +19235,22 @@ __metadata:
languageName: node
linkType: hard
"copy-webpack-plugin@npm:^11.0.0":
version: 11.0.0
resolution: "copy-webpack-plugin@npm:11.0.0"
dependencies:
fast-glob: ^3.2.11
glob-parent: ^6.0.1
globby: ^13.1.1
normalize-path: ^3.0.0
schema-utils: ^4.0.0
serialize-javascript: ^6.0.0
peerDependencies:
webpack: ^5.1.0
checksum: a667dd226b26f148584a35fb705f5af926d872584912cf9fd203c14f2b3a68f473a1f5cf768ec1dd5da23820823b850e5d50458b685c468e4a224b25c12a15b4
languageName: node
linkType: hard
"core-js-compat@npm:3.9.0":
version: 3.9.0
resolution: "core-js-compat@npm:3.9.0"
@@ -20968,7 +20985,7 @@ __metadata:
languageName: node
linkType: hard
"dotenv@npm:^16.0.3, dotenv@npm:^16.1.4":
"dotenv@npm:16.3.1, dotenv@npm:^16.0.3, dotenv@npm:^16.1.4":
version: 16.3.1
resolution: "dotenv@npm:16.3.1"
checksum: b95ff1bbe624ead85a3cd70dbd827e8e06d5f05f716f2d0cbc476532d54c7c9469c3bc4dd93ea519f6ad711cb522c00ac9a62b6eb340d5affae8008facc3fbd7
@@ -23025,6 +23042,19 @@ __metadata:
languageName: node
linkType: hard
"fast-glob@npm:^3.2.11, fast-glob@npm:^3.3.0":
version: 3.3.1
resolution: "fast-glob@npm:3.3.1"
dependencies:
"@nodelib/fs.stat": ^2.0.2
"@nodelib/fs.walk": ^1.2.3
glob-parent: ^5.1.2
merge2: ^1.3.0
micromatch: ^4.0.4
checksum: b68431128fb6ce4b804c5f9622628426d990b66c75b21c0d16e3d80e2d1398bf33f7e1724e66a2e3f299285dcf5b8d745b122d0304e7dd66f5231081f33ec67c
languageName: node
linkType: hard
"fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9":
version: 3.3.0
resolution: "fast-glob@npm:3.3.0"
@@ -24771,7 +24801,7 @@ __metadata:
languageName: node
linkType: hard
"glob-parent@npm:^6.0.2":
"glob-parent@npm:^6.0.1, glob-parent@npm:^6.0.2":
version: 6.0.2
resolution: "glob-parent@npm:6.0.2"
dependencies:
@@ -25001,6 +25031,19 @@ __metadata:
languageName: node
linkType: hard
"globby@npm:^13.1.1":
version: 13.2.2
resolution: "globby@npm:13.2.2"
dependencies:
dir-glob: ^3.0.1
fast-glob: ^3.3.0
ignore: ^5.2.4
merge2: ^1.4.1
slash: ^4.0.0
checksum: a8d7cc7cbe5e1b2d0f81d467bbc5bc2eac35f74eaded3a6c85fc26d7acc8e6de22d396159db8a2fc340b8a342e74cac58de8f4aee74146d3d146921a76062664
languageName: node
linkType: hard
"globby@npm:^9.2.0":
version: 9.2.0
resolution: "globby@npm:9.2.0"
@@ -26162,7 +26205,7 @@ __metadata:
languageName: node
linkType: hard
"ignore@npm:^5.1.8, ignore@npm:^5.2.0":
"ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4":
version: 5.2.4
resolution: "ignore@npm:5.2.4"
checksum: 7c7cd90edd9fea6e037f9b9da4b01bf0a86b198ce78345f9bbd983929d68ff14830be31111edc5d70c264921f4962404d75b7262b4d9cc3bc12381eccbd03096
@@ -39850,7 +39893,7 @@ __metadata:
languageName: node
linkType: hard
"serialize-javascript@npm:^6.0.1":
"serialize-javascript@npm:^6.0.0, serialize-javascript@npm:^6.0.1":
version: 6.0.1
resolution: "serialize-javascript@npm:6.0.1"
dependencies: