vpc
vite-plugin-cross-origin-isolation
npm i vite-plugin-cross-origin-isolation
vpc

vite-plugin-cross-origin-isolation

A vite plugin for enabling cross-origin-isolation for dev server.

by Qichao Lan

0.1.1 (see all)License:MITTypeScript:Not Found
npm i vite-plugin-cross-origin-isolation
Readme

vite-plugin-cross-origin-isolation

A vite plugin for enabling cross-origin-isolation for dev server.

Why

Cross origin isolation is required for SharedArrayBuffer.

Using this plugin, in local dev server, functions that rely on SAB can be enabled and tested.

Usage

First install it in your vite project:

npm i -D vite-plugin-cross-origin-isolation

Then, in vite.config.js:

import crossOriginIsolation from 'vite-plugin-cross-origin-isolation'

export default {
    plugins: [
      // other plugins...
      crossOriginIsolation()
    ]
}

License

The MIT License (MIT)

Copyright (c) 2021 - present Qichao Lan (chaosprint)

Downloads/wk

168

GitHub Stars

13

LAST COMMIT

4mos ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

2

OPEN PRs

0
VersionTagPublished
0.1.1
latest
1yr ago
No alternatives found
No tutorials found
Add a tutorial