mirror of
https://github.com/vector-im/element-web.git
synced 2026-04-27 16:32:19 +02:00
Fix Module API versioning (#33233)
* Fix Module API versioning * Attempt #2
This commit is contained in:
parent
8fa7b5ca2c
commit
fb263ee511
@ -11,6 +11,8 @@ import { defineConfig } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
import externalGlobals from "rollup-plugin-external-globals";
|
||||
|
||||
import packageJson from "./package.json" with { type: "json" };
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export default defineConfig({
|
||||
@ -32,7 +34,9 @@ export default defineConfig({
|
||||
}),
|
||||
],
|
||||
define: {
|
||||
__VERSION__: JSON.stringify(process.env.npm_package_version),
|
||||
// We cannot use `process.env.npm_package_version` as when building element-web with module-api set to `workspace`
|
||||
// this would contain the version of element-web rather than that of the module-api.
|
||||
__VERSION__: JSON.stringify(packageJson.version),
|
||||
// Use production mode for the build as it is tested against production builds of Element Web,
|
||||
// this is required for React JSX versions to be compatible.
|
||||
process: { env: { NODE_ENV: "production" } },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user