Skip to content

Commit

Permalink
build: BABEL! BABEL! BABEL!
Browse files Browse the repository at this point in the history
  • Loading branch information
EnixCoda committed Mar 9, 2019
1 parent cef3513 commit bb652c5
Show file tree
Hide file tree
Showing 4 changed files with 671 additions and 1,446 deletions.
16 changes: 8 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"presets": [
[
"babel-preset-env",
"@babel/preset-env",
{
"targets": {
"chrome": "60"
}
"chrome": "67"
},
}
],
"react"
"@babel/preset-typescript",
"@babel/preset-react",
],
"plugins": [
"transform-decorators-legacy",
"transform-class-properties",
["transform-object-rest-spread", { "useBuiltIns": true }]
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
]
}
}
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
"safe-touch": "^0.2.2"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-class-properties": "^7.3.4",
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
"@babel/preset-env": "^7.3.4",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
"@svgr/webpack": "^4.1.0",
"@types/chrome": "^0.0.77",
"@types/ini": "^1.3.30",
Expand All @@ -32,16 +39,8 @@
"@types/nprogress": "^0.0.29",
"@types/react": "^16.8.2",
"@types/react-dom": "^16.8.0",
"awesome-typescript-loader": "^5.2.1",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.2",
"babel-plugin-react-require": "^3.0.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.5",
"copy-webpack-plugin": "^4.6.0",
"css-loader": "^0.28.7",
"eslint": "^4.19.1",
Expand Down
9 changes: 1 addition & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const UglifyJSWebpackPlugin = require('uglifyjs-webpack-plugin')
const { CheckerPlugin } = require('awesome-typescript-loader')
const path = require('path')

const srcPath = path.resolve(__dirname, 'src')
Expand All @@ -19,7 +18,6 @@ const plugins = [
},
]),
new webpack.SourceMapDevToolPlugin({}),
new CheckerPlugin(),
]

const IN_PRODUCTION_MODE = process.env.NODE_ENV === 'production'
Expand Down Expand Up @@ -57,18 +55,13 @@ module.exports = {
module: {
rules: [
{
test: /\.jsx?$/,
test: /\.tsx?$/,
loader: 'babel-loader',
options: {
cacheDirectory: true,
},
include: [srcPath, packagesPath],
},
{
test: /\.tsx?$/,
include: [srcPath],
loader: 'awesome-typescript-loader',
},
{
test: /\.less$/,
loader: ['style-loader', 'css-loader', 'less-loader'],
Expand Down
Loading

0 comments on commit bb652c5

Please sign in to comment.