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

feat(instantsearch-ui-components): update build #6037

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ module.exports = (api) => {
],
],
},
{
test: 'packages/instantsearch-ui-components',
plugins: [
[
'@babel/plugin-transform-runtime',
{
corejs: false,
helpers: true,
regenerator: true,
},
],
],
},
],
// jsx is transpiled, so the comment should no longer be present in the final files
shouldPrintComment: (value) => value !== '* @jsx h ',
Expand Down
6 changes: 4 additions & 2 deletions packages/instantsearch-ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
"description": "Common UI components for InstantSearch.",
"source": "src/index.ts",
"types": "dist/es/index.d.ts",
"main": "dist/es/index.js",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"type": "module",
"exports": {
"types": "./dist/es/index.d.ts",
"require": "./dist/cjs/index.js",
"default": "./dist/es/index.js"
},
"sideEffects": false,
Expand Down Expand Up @@ -38,8 +39,9 @@
],
"scripts": {
"clean": "rm -rf dist",
"build": "yarn build:es && yarn build:types",
"build": "yarn build:cjs && yarn build:es && yarn build:types",
"build:es": "BABEL_ENV=es babel src --root-mode upward --extensions '.js,.ts,.tsx' --out-dir dist/es --ignore '**/__tests__/**/*','**/__mocks__/**/*' --quiet",
"build:cjs": "BABEL_ENV=cjs babel src --root-mode upward --extensions '.js,.ts,.tsx' --out-dir dist/cjs --ignore '**/__tests__/**/*','**/__mocks__/**/*' --quiet && ../../scripts/prepare-cjs.sh",
"build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/es",
"version": "./scripts/version.cjs"
}
Expand Down
1 change: 1 addition & 0 deletions packages/instantsearch.js/scripts/rollup/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const plugins = [
}),
babel({
rootMode: 'upward',
runtimeHelpers: true,
exclude: /node_modules|algoliasearch-helper/,
extensions: ['.js', '.ts', '.tsx'],
}),
Expand Down