Skip to content

Commit 1b41dc3

Browse files
committed
Make the webpack config work for us
This moves the babel and postcss configs into the webpack config for ease of maintenance (and because we need variations of them). The typescript config is left outside the webpack config for IDEs to pick it up.
1 parent c44a6e2 commit 1b41dc3

6 files changed

Lines changed: 2531 additions & 1296 deletions

File tree

‎.babelrc‎

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

‎package.json‎

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@
6363
"test-multi": "karma start"
6464
},
6565
"dependencies": {
66-
"babel-polyfill": "^6.26.0",
67-
"babel-runtime": "^6.26.0",
6866
"browser-request": "^0.3.3",
6967
"favico.js": "^0.3.10",
7068
"gemini-scrollbar": "github:matrix-org/gemini-scrollbar#91e1e566",
@@ -83,27 +81,32 @@
8381
"url": "^0.11.0"
8482
},
8583
"devDependencies": {
86-
"autoprefixer": "^6.6.0",
87-
"babel-cli": "^6.26.0",
88-
"babel-core": "^6.26.3",
89-
"babel-eslint": "^8.1.1",
90-
"babel-loader": "^7.1.5",
91-
"babel-plugin-add-module-exports": "^0.2.1",
92-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
93-
"babel-plugin-transform-builtin-extend": "^1.1.2",
94-
"babel-plugin-transform-class-properties": "^6.24.1",
95-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
96-
"babel-plugin-transform-runtime": "^6.23.0",
97-
"babel-preset-es2015": "^6.24.1",
98-
"babel-preset-es2016": "^6.24.1",
99-
"babel-preset-es2017": "^6.24.1",
100-
"babel-preset-react": "^6.24.1",
101-
"babel-preset-stage-2": "^6.24.1",
84+
"@babel/cli": "^7.7.5",
85+
"@babel/core": "^7.7.5",
86+
"@babel/plugin-proposal-class-properties": "^7.7.4",
87+
"@babel/plugin-proposal-decorators": "^7.7.4",
88+
"@babel/plugin-proposal-export-default-from": "^7.7.4",
89+
"@babel/plugin-proposal-numeric-separator": "^7.7.4",
90+
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
91+
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
92+
"@babel/plugin-transform-flow-comments": "^7.7.4",
93+
"@babel/plugin-transform-runtime": "^7.7.6",
94+
"@babel/preset-env": "^7.7.6",
95+
"@babel/preset-flow": "^7.7.4",
96+
"@babel/preset-react": "^7.7.4",
97+
"@babel/preset-typescript": "^7.7.4",
98+
"@babel/register": "^7.7.4",
99+
"@babel/runtime": "^7.7.6",
100+
"@types/react": "^16.9.16",
101+
"@types/react-dom": "^16.9.4",
102+
"autoprefixer": "^9.7.3",
103+
"babel-eslint": "^10.0.3",
104+
"babel-loader": "^8.0.6",
102105
"chokidar": "^2.0.4",
103106
"concurrently": "^4.0.1",
104107
"cpx": "^1.3.2",
105108
"cross-env": "^4.0.0",
106-
"css-loader": "^2.1.0",
109+
"css-loader": "^3.3.2",
107110
"electron-builder": "^21.2.0",
108111
"electron-builder-squirrel-windows": "^21.2.0",
109112
"electron-devtools-installer": "^2.2.4",
@@ -117,7 +120,7 @@
117120
"eslint-plugin-react-hooks": "^2.2.0",
118121
"expect": "^1.16.0",
119122
"extract-text-webpack-plugin": "^4.0.0-beta.0",
120-
"file-loader": "^3.0.1",
123+
"file-loader": "^5.0.2",
121124
"fs-extra": "^0.30.0",
122125
"html-webpack-plugin": "^3.2.0",
123126
"json-loader": "^0.5.3",
@@ -133,23 +136,27 @@
133136
"loader-utils": "^1.2.3",
134137
"matrix-mock-request": "^1.2.3",
135138
"matrix-react-test-utils": "^0.2.2",
139+
"mini-css-extract-plugin": "^0.8.0",
136140
"minimist": "^1.2.0",
137141
"mkdirp": "^0.5.1",
138142
"mocha": "^5.2.0",
143+
"optimize-css-assets-webpack-plugin": "^5.0.3",
139144
"postcss-extend": "^1.0.5",
140-
"postcss-import": "^11.1.0",
141-
"postcss-loader": "^2.1.6",
142-
"postcss-mixins": "^6.2.0",
143-
"postcss-nested": "^3.0.0",
144-
"postcss-scss": "^1.0.6",
145-
"postcss-simple-vars": "^4.1.0",
145+
"postcss-import": "^12.0.1",
146+
"postcss-loader": "^3.0.0",
147+
"postcss-mixins": "^6.2.3",
148+
"postcss-nested": "^4.2.1",
149+
"postcss-preset-env": "^6.7.0",
150+
"postcss-scss": "^2.0.0",
151+
"postcss-simple-vars": "^5.0.2",
146152
"postcss-strip-inline-comments": "^0.1.5",
147153
"rimraf": "^2.4.3",
148154
"shell-escape": "^0.2.0",
149-
"source-map-loader": "^0.2.4",
150-
"webpack": "^4.23.1",
151-
"webpack-cli": "^3.1.2",
152-
"webpack-dev-server": "^3.1.11"
155+
"terser-webpack-plugin": "^2.3.0",
156+
"typescript": "^3.7.3",
157+
"webpack": "^4.41.2",
158+
"webpack-cli": "^3.3.10",
159+
"webpack-dev-server": "^3.9.0"
153160
},
154161
"build": {
155162
"appId": "im.riot.app",

‎postcss.config.js‎

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

‎tsconfig.json‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"experimentalDecorators": true,
4+
"emitDecoratorMetadata": true,
5+
"module": "commonjs",
6+
"moduleResolution": "node",
7+
"target": "es2016",
8+
"noImplicitAny": false,
9+
"sourceMap": false,
10+
"outDir": "./lib",
11+
"declaration": true,
12+
"types": [
13+
"node"
14+
]
15+
},
16+
"include": [
17+
"./src/**/*.ts"
18+
]
19+
}

0 commit comments

Comments
 (0)