Fix SDK build

This commit is contained in:
RMidhunSuresh 2022-04-13 17:12:38 +05:30
parent 83dffef47d
commit 2d8a3d9f9b
4 changed files with 14 additions and 5 deletions

View file

@ -11,7 +11,7 @@ cp doc/SDK.md target/README.md
pushd target
pushd asset-build/assets
mv main.*.js ../../main.js
mv index.*.css ../../style.css
mv *light.*.css ../../style.css
mv download-sandbox.*.html ../../download-sandbox.html
rm *.js *.wasm
mv ./* ../../

View file

@ -2,8 +2,6 @@
<!-- this file contains all references to include in the SDK asset build (using vite.sdk-assets-config.js) -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="./platform/web/ui/css/main.css">
<link rel="stylesheet" type="text/css" href="./platform/web/ui/css/themes/element/theme.css">
</head>
<body>
<script type="module">

View file

@ -1,6 +1,7 @@
const path = require("path");
const mergeOptions = require('merge-options');
const commonOptions = require("./vite.common-config.js");
const themeBuilder = require("./scripts/build-plugins/rollup-plugin-build-themes");
const {commonOptions, compiledVariables} = require("./vite.common-config.js");
export default mergeOptions(commonOptions, {
root: "src/",
@ -8,4 +9,13 @@ export default mergeOptions(commonOptions, {
build: {
outDir: "../target/asset-build/",
},
plugins: [
themeBuilder({
themeConfig: {
themes: { element: "./src/platform/web/ui/css/themes/element" },
default: "element",
},
compiledVariables,
}),
],
});

View file

@ -1,6 +1,7 @@
const path = require("path");
const mergeOptions = require('merge-options');
const commonOptions = require("./vite.common-config.js");
const themeBuilder = require("./scripts/build-plugins/rollup-plugin-build-themes");
const {commonOptions, compiledVariables} = require("./vite.common-config.js");
const manifest = require("./package.json");
const externalDependencies = Object.keys(manifest.dependencies)