Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@remcovaes/web-test-runner-vite-plugin

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remcovaes/web-test-runner-vite-plugin

@web/test-runner plugin to allow the build to be done by Vite

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@web/dev-server Vite plugin

A @web/test-runner plugin that allows files to be built with Vite instead of @web/dev-server. Inspired by vite-web-test-runner.

Usage

npm install @remcovaes/web-test-runner-vite-plugin --save-dev

Examples

Simple and no configuration:

// web-test-runner.config.js
import { vitePlugin } from '@remcovaes/web-test-runner-vite-plugin';

export default {
	files: 'src/**/*.test.ts',
	plugins: [
		vitePlugin(),
	],
};

Use the following prop in the @web/test-runner to remove vite logging.

// web-test-runner.config.js
import { removeViteLogging } from '@remcovaes/web-test-runner-vite-plugin';

export default {
	...,
	filterBrowserLogs: removeViteLogging,
};

Use a vite config to make the build more complex. This can be done via a config file or directly passing it to the plugin. For example, to enable react support without a vite config, you can use the following config:

// web-test-runner.config.js
import { vitePlugin } from './src/index.js';

import reactRefresh from '@vitejs/plugin-react-refresh';

export default {
	files: [ 'test/**/*.test.ts', 'test/**/*.test.jsx' ],
	plugins: [
		vitePlugin({
			plugins: [ reactRefresh() ],
		}),
	],
};

Keywords

FAQs

Package last updated on 16 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc