vite-plugin-cdn-externals
v1.1.6
Published
Use to external cdn resources eg.React, Vue
Downloads
27
Readme
vite-plugin-cdn-externals
Use to external cdn resources eg.React, Vue
Usage
import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import cdnExternals from 'vite-plugin-cdn-externals';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
reactRefresh(),
cdnExternals({
react: 'React',
'react-dom': 'ReactDOM',
'@alifd/next': 'Next',
moment: 'moment',
}),
],
});