Skip to content

feat(no-inject-style): Added second build witouth style injection #720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ yarn add react-multi-select-component # yarn
```tsx
import React, { useState } from "react";
import { MultiSelect } from "react-multi-select-component";
// or without style injection (in the presence of Content Security Policy issues)
// import { MultiSelect } from "react-multi-select-component/no-inject-style";
// import "react-multi-select-component/no-inject-style/index.css";

const options = [
{ label: "Grapes 🍇", value: "grapes" },
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"module": "./dist/esm/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup src/index.tsx --inject-style --legacy-output --minify --format esm,cjs --dts --external react",
"build:no-inject-style": "tsup src/index.tsx --outDir dist/no-inject-style --legacy-output --minify --format esm,cjs --dts --external react",
"build:inject-style": "tsup src/index.tsx --inject-style --legacy-output --minify --format esm,cjs --dts --external react",
"build": "yarn run build:inject-style && yarn run build:no-inject-style",
"dev": "tsup src/index.tsx --inject-style --legacy-output --format esm,cjs --watch --dts --external react",
"lint": "eslint src --fix",
"size": "size-limit",
Expand Down