Skip to content
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

fix duplicated vite config #3180

Merged
merged 3 commits into from
May 23, 2023
Merged
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
5 changes: 5 additions & 0 deletions .changeset/spicy-eagles-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphiql/react': patch
---

Remove duplicate Vite config and again make sure to not include `react/jsx-runtime` in the bundle
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ yarn-1.18.0.js

examples/*/yarn.lock
.eslintcache

vite.config.d.ts
vite.config.js
2 changes: 0 additions & 2 deletions packages/graphiql-react/vite.config.d.ts

This file was deleted.

42 changes: 0 additions & 42 deletions packages/graphiql-react/vite.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/graphiql-react/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import reactSvgPlugin from 'vite-plugin-react-svg';
import postCssNestingPlugin from 'postcss-nesting';

export default defineConfig({
plugins: [
Expand All @@ -11,12 +12,18 @@ export default defineConfig({
titleProp: true,
}),
],
css: {
postcss: {
plugins: [postCssNestingPlugin()],
},
},
esbuild: {
// We use function names for generating readable error messages, so we want
// them to be preserved when building and minifying.
keepNames: true,
},
build: {
sourcemap: true,
Copy link
Collaborator

@dimaMachina dimaMachina May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we still include src/**/*.ts files in the bundle?https://discord.com/channels/625400653321076807/966768858402816020/1080508965768667236

lib: {
entry: 'src/index.ts',
fileName: 'graphiql-react',
Expand Down
Loading