-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #778 from strapi/releases/expermental-vite
- Loading branch information
Showing
36 changed files
with
1,069 additions
and
4,341 deletions.
There are no files selected for viewing
This file contains 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 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 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,7 +1,5 @@ | ||
{ | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"version": "1.2.8", | ||
"packages": ["packages/*"], | ||
"version": "0.0.0-vite-bundler.0", | ||
"npmClient": "yarn" | ||
} |
This file contains 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 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,34 @@ | ||
{ | ||
"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 }], | ||
"no-console": ["error", { "allow": ["warn", "error"] }] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": "*.mdx", | ||
"parser": "eslint-mdx", | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"no-console": 0 | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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 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 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 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,35 @@ | ||
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) => { | ||
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.