diff --git a/package-lock.json b/package-lock.json index 642aaa39..86b46836 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mapbox/mr-ui", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@mapbox/mr-ui", - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.4", "license": "BSD-2-Clause", "dependencies": { "@mapbox/mbx-assembly": "^1.3.0-beta.1", @@ -32,8 +32,6 @@ }, "devDependencies": { "@babel/cli": "^7.18.6", - "@babel/core": "^7.18.6", - "@babel/preset-react": "^7.18.6", "@mapbox/jsxtreme-markdown": "^0.9.3", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^12.1.2", diff --git a/package.json b/package.json index 0f27384c..3f8f3dbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mapbox/mr-ui", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "UI components for Mapbox projects", "main": "index.js", "scripts": { @@ -56,8 +56,6 @@ }, "devDependencies": { "@babel/cli": "^7.18.6", - "@babel/core": "^7.18.6", - "@babel/preset-react": "^7.18.6", "@mapbox/jsxtreme-markdown": "^0.9.3", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^12.1.2", diff --git a/scripts/babel.config.js b/scripts/babel.config.js index 5535a22d..597a9815 100644 --- a/scripts/babel.config.js +++ b/scripts/babel.config.js @@ -1,18 +1,7 @@ module.exports = { - presets: ['@babel/preset-react'], - overrides: [ - { - test: /\.tsx$/, - presets: [ - '@mapbox/babel-preset-mapbox', - [ - '@babel/typescript', - { - allExtensions: true, - isTSX: true - } - ] - ] - } + presets: [ + '@babel/preset-env', + '@babel/preset-react', + '@babel/preset-typescript' ] }; diff --git a/scripts/build-package.js b/scripts/build-package.js index a38a111f..5c648944 100755 --- a/scripts/build-package.js +++ b/scripts/build-package.js @@ -24,7 +24,7 @@ const srcDir = path.resolve(rootDir, 'src/components'); // tests and examples. function compileComponents() { return execa.shell( - `babel "${rootDir}/src/components" --out-dir ${outputDir} --ignore "**/examples","**/*.test.(j|t)s" --config-file ${rootDir}/scripts/babel.config.js`, + `babel "${rootDir}/src/components" --out-dir ${outputDir} --ignore "**/examples","**/*.test.tsx" --config-file ${rootDir}/scripts/babel.config.js --extensions ".ts,.tsx,.js"`, { cwd: srcDir, stdio: 'inherit' @@ -34,7 +34,7 @@ function compileComponents() { // Copy non-src files that we want in the package. function copyFiles() { - return cpy(['LICENSE_Mapbox', 'CHANGELOG.md', 'README.md'], outputDir, { + return cpy(['LICENSE', 'CHANGELOG.md', 'README.md'], outputDir, { cwd: rootDir }); }