Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"noEmit": true
},
"include": [
"vite.config.ts",
"./src"
]
}
17 changes: 11 additions & 6 deletions vite.config.js → vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { resolve } from 'path'
import { defineConfig } from 'vite'
import { defineConfig } from 'vitest/config'
import dts from 'vite-plugin-dts';
import checker from 'vite-plugin-checker';

Expand All @@ -22,7 +22,7 @@ export default defineConfig({
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/RosLib.js'),
entry: resolve(__dirname, 'src/RosLib.ts'),
name: 'ROSLIB',
// the proper extensions will be added
fileName: 'RosLib',
Expand All @@ -38,13 +38,18 @@ export default defineConfig({
},
test: {
include: [
'{src,test}/**\/*.{test,spec}.?(c|m)[jt]s?(x)',
'{src,test}/**/*.{test,spec}.?(c|m)[jt]s?(x)',
'./test/examples/*.js',
],
exclude: ['dist'],
environmentMatchGlobs: [
// React example requires DOM emulation
['examples/react-example/**', 'jsdom']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change of running everything in jsdom makes sense to me since it shouldn't be harmful, but I figured I'd leave a comment pointing out that it is a change regardless.

projects: [
{
extends: true,
test: {
environment: 'jsdom',
name: 'jsdom',
},
},
]
}
})