Skip to content

Commit 6c32a64

Browse files
committed
Merge branch 'swc' into dev
2 parents effa223 + a2d5b41 commit 6c32a64

File tree

13 files changed

+8392
-11348
lines changed

13 files changed

+8392
-11348
lines changed

.editorconfig

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,14 @@ root = true
33
[*]
44
end_of_line = lf
55
charset = utf-8
6-
indent_style = tab
7-
indent_size = 4
6+
indent_style = space
7+
indent_size = 2
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010

11-
[*.{js,json,yml}]
12-
indent_style = space
13-
indent_size = 2
11+
[*.html]
12+
indent_style = tab
13+
indent_size = 4
1414

1515
[*.md]
1616
trim_trailing_whitespace = false
17-
18-
[*.{scss,sass,css}]
19-
indent_style = space
20-
indent_size = 2
21-
22-
[{Movefile,.eslintrc}]
23-
indent_style = space
24-
indent_size = 2

.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
module.exports = {
22
extends: ['airbnb', 'prettier'],
3-
plugins: ['prefer-arrow', '@babel', 'react', 'unused-imports', 'prettier'],
3+
plugins: ['prefer-arrow', 'react', 'unused-imports', 'prettier'],
44
env: {
55
es6: true,
66
browser: true,
77
node: true,
88
jquery: true,
99
},
10-
parser: '@babel/eslint-parser',
1110
parserOptions: {
1211
ecmaVersion: 2020,
1312
sourceType: 'module',

.swcrc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://json.schemastore.org/swcrc",
3+
"jsc": {
4+
"parser": {
5+
"syntax": "ecmascript",
6+
"jsx": false,
7+
"dynamicImport": false,
8+
"privateMethod": false,
9+
"functionBind": false,
10+
"exportDefaultFrom": false,
11+
"exportNamespaceFrom": false,
12+
"decorators": false,
13+
"decoratorsBeforeExport": false,
14+
"topLevelAwait": false,
15+
"importMeta": false
16+
},
17+
"transform": null,
18+
"target": "es5",
19+
"loose": false,
20+
"externalHelpers": false,
21+
// Requires v1.2.50 or upper and requires target to be es2016 or upper.
22+
"keepClassNames": false
23+
},
24+
// https://swc.rs/docs/configuration/supported-browsers
25+
"env": {
26+
"mode": "usage",
27+
"coreJs": "3.25"
28+
},
29+
"minify": false
30+
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- webpack 5
77
- Dynamic entry points: w/ [@sect/webpack-sweet-entry](https://github.com/sectsect/webpack-sweet-entry)
88
- [PostCSS](https://postcss.org/) w/ [postcss-preset-env](https://github.com/csstools/postcss-preset-env)
9-
- [Babel](https://babeljs.io/) w/ [@babel/preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env)
9+
- [SWC](https://swc.rs/)
1010
- [ESLint](https://eslint.org/) w/ [Airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb)
1111
- [stylelint](https://stylelint.io/)
1212
- [Prettier](https://prettier.io/)
@@ -29,7 +29,7 @@
2929

3030
## :beer: Setup
3131

32-
- **Setting for Support Browser (For [Autoprefixer](https://github.com/postcss/autoprefixer) / [babel-preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env) / [postcss-preset-env](https://github.com/csstools/postcss-preset-env))**
32+
- **Setting for Support Browser (For [Autoprefixer](https://github.com/postcss/autoprefixer) / [SWC](https://swc.rs/) / [postcss-preset-env](https://github.com/csstools/postcss-preset-env))**
3333
Edit the following Line
3434
[package.json](https://github.com/sectsect/webpack-postcss/blob/master/package.json#L13)
3535

@@ -52,9 +52,9 @@ See [package.json](https://github.com/sectsect/webpack-postcss/blob/master/packa
5252
:memo: `.env` file is already set to "ignore" within the `.giignore` file.
5353

5454
## Troubleshooting
55-
### Remove Cache (Babel / ESLint / webpack)
55+
### Remove Cache (SWC / ESLint / webpack)
5656
```bash
57-
$ rm -rf node_modules/.cache/babel-loader
57+
$ rm -rf node_modules/.cache/swc-loader
5858
$ rm -rf node_modules/.cache/eslint-loader
5959
$ rm -rf node_modules/.cache/webpack
6060
# Remove all

babel.config.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

dist/assets/js/commons.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/js/page-frontpage.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/js/page-single.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)