fix: bun monorepo complex deps
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Paraglide monorepo app A</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="./main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as messages from "@workspace/i18n/messages";
|
||||
import { setLocale } from "@workspace/i18n/runtime";
|
||||
|
||||
setLocale("sv");
|
||||
|
||||
const app = document.querySelector("#app");
|
||||
if (app) {
|
||||
app.textContent = `${messages.hero()} :: ${messages.hello()}`;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "paraglide-monorepo-app-a",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@workspace/i18n": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "catalog:"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
export default {
|
||||
resolve: {
|
||||
preserveSymlinks: true,
|
||||
},
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
preserveSymlinks: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Paraglide monorepo app B</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="./main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as messages from "@workspace/i18n/messages";
|
||||
|
||||
const app = document.querySelector("#app");
|
||||
if (app) {
|
||||
app.textContent = `${messages.hero({ locale: "en" })} :: ${messages.hello({ locale: "en" })}`;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "paraglide-monorepo-app-b",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@workspace/i18n": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "catalog:"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
export default {
|
||||
resolve: {
|
||||
preserveSymlinks: true,
|
||||
},
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
preserveSymlinks: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||
"hello": "Hello from the shared translations",
|
||||
"hero": "One shared translation source"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||
"hello": "Hej fran de delade oversattningarna",
|
||||
"hero": "En gemensam oversattningskalla"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@workspace/i18n",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./messages": "./src/paraglide/messages.js",
|
||||
"./runtime": "./src/paraglide/runtime.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@inlang/paraglide-js": "catalog:"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://inlang.com/schema/project-settings",
|
||||
"baseLocale": "en",
|
||||
"locales": [
|
||||
"en",
|
||||
"sv"
|
||||
],
|
||||
"modules": [
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
|
||||
],
|
||||
"plugin.inlang.messageFormat": {
|
||||
"pathPattern": "./messages/{locale}.json"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user