Skip to content

Commit

Permalink
Remove Babel support
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Aug 23, 2024
1 parent 7403aa5 commit 13b2772
Show file tree
Hide file tree
Showing 20 changed files with 14 additions and 354 deletions.
25 changes: 0 additions & 25 deletions examples/config-babel/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions examples/config-babel/babel.config.json

This file was deleted.

Binary file removed examples/config-babel/images/babel.png
Binary file not shown.
Binary file removed examples/config-babel/images/extension_128.png
Binary file not shown.
Binary file removed examples/config-babel/images/extension_16.png
Binary file not shown.
Binary file removed examples/config-babel/images/extension_48.png
Binary file not shown.
14 changes: 0 additions & 14 deletions examples/config-babel/manifest.json

This file was deleted.

40 changes: 0 additions & 40 deletions examples/config-babel/newtab/index.html

This file was deleted.

11 changes: 0 additions & 11 deletions examples/config-babel/newtab/scripts.js

This file was deleted.

22 changes: 0 additions & 22 deletions examples/config-babel/newtab/styles.css

This file was deleted.

14 changes: 0 additions & 14 deletions examples/config-babel/package.json

This file was deleted.

1 change: 0 additions & 1 deletion examples/content-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"tailwindcss": "^3.4.1"
},
"devDependencies": {
"@babel/plugin-transform-react-jsx": "^7.25.2",
"typescript": "5.3.3"
}
}
9 changes: 0 additions & 9 deletions examples/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ const JS_TEMPLATES: Template[] = [
configFiles: undefined
},
// {
// name: 'config-babel',
// uiContext: ['newTab'],
// uiFramework: undefined,
// css: 'css',
// hasBackground: false,
// hasEnv: false,
// configFiles: ['babel.config.json']
// },
// {
// name: 'content-extension-config',
// uiContext: ['content'],
// uiFramework: 'react',
Expand Down
1 change: 0 additions & 1 deletion examples/new-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"sakura.css": "^1.5.0"
},
"devDependencies": {
"@babel/plugin-transform-react-jsx": "^7.25.2",
"typescript": "5.3.3"
}
}
1 change: 0 additions & 1 deletion examples/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export type ConfigFiles =
| 'postcss.config.js'
| 'tailwind.config.js'
| 'tsconfig.json'
| 'babel.config.js'
| 'stylelint.config.json'
| 'extension.config.js'

Expand Down
4 changes: 2 additions & 2 deletions programs/create/create.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ describe('extension create', () => {
? 'ts'
: 'tsx'
: template.configFiles?.includes('tsconfig.json')
? 'ts'
: 'js'
? 'ts'
: 'js'

template.uiContext?.forEach((context: string) => {
// Expect [context]/index.html for all contexts except 'content'
Expand Down
3 changes: 0 additions & 3 deletions programs/develop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,12 @@
"typescript": "5.3.3"
},
"optionalDependencies": {
"@babel/core": "^7.24.9",
"@prefresh/core": "^1.5.2",
"@prefresh/utils": "^1.2.0",
"@prefresh/webpack": "^4.0.1",
"@rspack/plugin-preact-refresh": "^1.0.0",
"@rspack/plugin-react-refresh": "^1.0.0",
"@vue/compiler-sfc": "^3.4.34",
"babel-loader": "^9.1.3",
"babel-preset-modern-browser-extension": "^0.7.0",
"less": "^4.2.0",
"less-loader": "^12.2.0",
"postcss-flexbugs-fixes": "^5.0.2",
Expand Down
4 changes: 0 additions & 4 deletions programs/develop/webpack/plugin-js-frameworks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import path from 'path'
import {type Compiler} from '@rspack/core'
import {PluginInterface} from '../webpack-types'
import {type DevOptions} from '../../commands/dev'
import {maybeUseBabel} from './js-tools/babel'
import {isUsingPreact, maybeUsePreact} from './js-tools/preact'
import {isUsingReact, maybeUseReact} from './js-tools/react'
import {maybeUseVue} from './js-tools/vue'
Expand All @@ -25,13 +24,11 @@ export class JsFrameworksPlugin {
private async configureOptions(compiler: Compiler) {
const projectPath = path.dirname(this.manifestPath)

const maybeInstallBabel = await maybeUseBabel(compiler, projectPath)
const maybeInstallReact = await maybeUseReact(projectPath)
const maybeInstallPreact = await maybeUsePreact(projectPath)
const maybeInstallVue = await maybeUseVue(projectPath)

compiler.options.resolve.alias = {
...(maybeInstallBabel?.alias || {}),
...(maybeInstallReact?.alias || {}),
...(maybeInstallPreact?.alias || {}),
...(maybeInstallVue?.alias || {}),
Expand Down Expand Up @@ -89,7 +86,6 @@ export class JsFrameworksPlugin {
}
}
},
// ...(maybeInstallBabel?.loaders || []),
...(maybeInstallReact?.loaders || []),
...(maybeInstallPreact?.loaders || []),
...(maybeInstallVue?.loaders || []),
Expand Down
Loading

0 comments on commit 13b2772

Please sign in to comment.