vite-plugin-inject-script
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

install

pnpm i vite-plugin-inject-script

vite.config

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import inject from "vite-plugin-inject-script";
const s = `
console.log("${new Date().toLocaleString()}");
`;
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), inject(s)],
});

TSDX Bootstrap

This project was bootstrapped with TSDX.

Local Development

Below is a list of commands you will probably find useful.

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-inject-script

Weekly Downloads

23

Version

0.1.0

License

MIT

Unpacked Size

22.7 kB

Total Files

12

Last publish

Collaborators

  • ahaoboy