Skip to content

Commit

Permalink
🔧 modify config for babel related
Browse files Browse the repository at this point in the history
  • Loading branch information
ddzy committed May 9, 2019
1 parent 8e00b7b commit cb941f1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .babelrc
@@ -0,0 +1,10 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript",
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
],
}
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --config webpack.config.ts",
"start": "webpack-dev-server"
"start": "webpack-dev-server",
"check": "tsc -w"
},
"repository": {
"type": "git",
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "esnext",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"module": "commonjs",
Expand All @@ -14,6 +14,8 @@
"es2015",
"es2016"
],
"sourceMap": true
"sourceMap": true,
"allowJs": true,
"noEmit": true
}
}
4 changes: 2 additions & 2 deletions webpack.config.ts
Expand Up @@ -16,8 +16,8 @@ export default {
module: {
rules: [
{
test: /\.ts?$/,
use: 'ts-loader',
test: /\.(ts|js)?$/,
use: 'babel-loader',
exclude: /node_modules/,
},
{
Expand Down

0 comments on commit cb941f1

Please sign in to comment.