mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
13659d036f
* ensure that eslint runs on all frontend code * remove tslint from `design-system` * enable prettier and eslint-prettier for `design-system` * Delete tslint.json * use a single editorconfig for the repo * enable prettier for all code in `design-system` * more linting fixes on design-system * ignore coverage for git and prettier * lintfix on editor-ui
44 lines
1,011 B
TypeScript
44 lines
1,011 B
TypeScript
import vue from '@vitejs/plugin-vue2';
|
|
import { resolve } from 'path';
|
|
import { defineConfig, mergeConfig } from 'vite';
|
|
import { defineConfig as defineVitestConfig } from 'vitest/config';
|
|
|
|
export default mergeConfig(
|
|
defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
'vue2-boring-avatars': require.resolve('vue2-boring-avatars'),
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, 'src', 'main.js'),
|
|
name: 'N8nDesignSystem',
|
|
fileName: (format) => `n8n-design-system.${format}.js`,
|
|
},
|
|
rollupOptions: {
|
|
// make sure to externalize deps that shouldn't be bundled
|
|
// into your library
|
|
external: ['vue'],
|
|
output: {
|
|
exports: 'named',
|
|
// Provide global variables to use in the UMD build
|
|
// for externalized deps
|
|
globals: {
|
|
vue: 'Vue',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}),
|
|
defineVitestConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/__tests__/setup.ts'],
|
|
},
|
|
}),
|
|
);
|