mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00

Modify existing console view plugin to recreate our own console view. Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
65 lines
1.4 KiB
TypeScript
65 lines
1.4 KiB
TypeScript
import {resolve} from "path";
|
|
import {defineConfig} from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
const outDir = 'yocto_console_view/static';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react({
|
|
babel: {
|
|
parserOpts: {
|
|
plugins: ['decorators-legacy', 'classProperties']
|
|
}
|
|
}
|
|
}),
|
|
],
|
|
define: {
|
|
'process.env.NODE_ENV': '"production"',
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, 'src/index.ts'),
|
|
name: "buildbotConsoleViewPlugin",
|
|
formats: ["umd"],
|
|
fileName: "scripts",
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
'axios',
|
|
'buildbot-data-js',
|
|
'buildbot-plugin-support',
|
|
'buildbot-ui',
|
|
'mobx',
|
|
'mobx-react',
|
|
'moment',
|
|
'react',
|
|
'react-dom',
|
|
'react-router-dom'
|
|
],
|
|
output: {
|
|
assetFileNames: 'styles.css',
|
|
entryFileNames: 'scripts.js',
|
|
globals: {
|
|
axios: "axios",
|
|
"buildbot-data-js": "BuildbotDataJs",
|
|
"buildbot-plugin-support": "BuildbotPluginSupport",
|
|
"buildbot-ui": "BuildbotUi",
|
|
mobx: "mobx",
|
|
"mobx-react": "mobxReact",
|
|
react: "React",
|
|
moment: "moment",
|
|
"react-dom": "ReactDOM",
|
|
"react-router-dom": "ReactRouterDOM",
|
|
},
|
|
},
|
|
},
|
|
target: ['es2020'],
|
|
outDir: outDir,
|
|
emptyOutDir: true,
|
|
},
|
|
test: {
|
|
environment: "jsdom"
|
|
},
|
|
});
|