-
Notifications
You must be signed in to change notification settings - Fork 187
feat: add vite to bundle #740
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
352a0bc
chore: add vite
joshuaellis ff8e178
chore: add fix storybook
joshuaellis 5bbb356
Merge branch 'main' into feature/use-vite
joshuaellis 4c1e6e5
chore: update lock files
joshuaellis f7c889d
chore: convert playwright
joshuaellis 64546d3
fix: rogue console.log and add warning for normal logs in eslint
joshuaellis b59f1e3
fix: use override to only apply no-console to component files
joshuaellis d7eff06
Merge branch 'main' into feature/use-vite
joshuaellis 7b3be30
Merge branch 'main' into feature/use-vite
joshuaellis 52daad8
chore: fix bad git merge
joshuaellis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 2020, // Allows for the parsing of modern ECMAScript features | ||
"sourceType": "module", // Allows for the use of imports | ||
"ecmaFeatures": { | ||
"jsx": true // Allows for the parsing of JSX | ||
} | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" // Tells eslint-plugin-react to automatically detect the version of React to use | ||
} | ||
}, | ||
"extends": [ | ||
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react | ||
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. | ||
], | ||
"rules": { | ||
"react/sort-prop-types": 1, | ||
"default-case": "error", | ||
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": "*.mdx", | ||
"parser": "eslint-mdx", | ||
"rules": { | ||
"react/react-in-jsx-scope": "off" | ||
} | ||
} | ||
] | ||
} | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
storybook-static | ||
.DS_Store | ||
src | ||
src | ||
codemod | ||
.storybook | ||
__mocks__ | ||
jest.config.js | ||
playwright.config.js | ||
test-bundler.js | ||
vite.config.js | ||
yarn.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"tabWidth": 2 | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { resolve } from 'path'; | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import glob from 'tiny-glob'; | ||
|
||
export default glob('./src/**/!(*.spec|*.e2e).{js,svg}').then(async (paths) => { | ||
console.log(paths, resolve(__dirname, './src/index.js')); | ||
joshuaellis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return defineConfig({ | ||
esbuild: { | ||
loader: 'jsx', | ||
include: /src\/.*\.jsx?$/, | ||
exclude: [], | ||
}, | ||
build: { | ||
target: 'es2020', | ||
lib: { | ||
entry: {}, | ||
formats: ['cjs', 'es'], | ||
fileName: (format) => { | ||
return `[name].${format === 'es' ? 'js' : format}`; | ||
}, | ||
}, | ||
rollupOptions: { | ||
input: [resolve(__dirname, './src/index.js'), ...paths.map((path) => `./${path}`)], | ||
// make sure to externalize deps that shouldn't be bundled | ||
// into your library | ||
external: (id) => !id.startsWith('.') && !id.startsWith('/'), | ||
output: { | ||
dir: 'dist', | ||
preserveModules: true, | ||
}, | ||
}, | ||
}, | ||
plugins: [react()], | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.