Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit a3a3585

Browse files
niveditcfacebook-github-bot
authored andcommitted
Update webpack-dev-server & babel version in TeX examples (#1981)
Summary: **Summary** * Upgrade `webpack-dev-server` to 3.1.14 to fix [vulnerability in versions < 3.1.11](https://nvd.nist.gov/vuln/detail/CVE-2018-14732) & `webpack` to 4.0.0 to match it * Upgrade `babel` to 6.0.0 & `babel-loader` to 7.0.0 to match `webpack` upgrade * Changes to `server.js` & `app.js` to support the `webpack` & `babel` version upgrades **Test Plan** Run `yarn start` and load http://localhost:3000/ <img width="1089" alt="screenshot 2019-01-21 13 22 30" src="https://user-images.githubusercontent.com/2357761/51502558-5974d780-1d8b-11e9-8568-917f43967188.png"> Pull Request resolved: #1981 Reviewed By: claudiopro Differential Revision: D13754649 Pulled By: claudiopro fbshipit-source-id: 19169f9b091d85344d975e2d7b963437b7701e9b
1 parent 363f66e commit a3a3585

File tree

8 files changed

+5568
-1528
lines changed

8 files changed

+5568
-1528
lines changed

examples/draft-0-10-0/tex/js/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
'use strict';
1616

17-
import 'babel/polyfill';
1817
import TeXEditorExample from './components/TeXEditorExample';
1918
import React from 'react';
2019
import ReactDOM from 'react-dom';

examples/draft-0-10-0/tex/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"start": "babel-node ./server.js"
55
},
66
"dependencies": {
7-
"babel": "5.8.23",
7+
"babel": "6.0.0",
88
"babel-core": "^6.8.0",
9-
"babel-loader": "^6.2.4",
9+
"babel-loader": "^7.0.0",
1010
"babel-preset-es2015": "^6.9.0",
1111
"babel-preset-react": "^6.11.1",
1212
"draft-js": "file:../../../",
@@ -15,8 +15,8 @@
1515
"katex": "^0.5.1",
1616
"react": "file:../../../node_modules/react",
1717
"react-dom": "file:../../../node_modules/react-dom",
18-
"webpack": "^1.10.5",
19-
"webpack-dev-server": "^1.10.1"
18+
"webpack": "^4.0.0",
19+
"webpack-dev-server": "^3.1.14"
2020
},
2121
"devDependencies": {
2222
"babel-cli": "^6.18.0"

examples/draft-0-10-0/tex/server.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ const APP_PORT = 3000;
2323
var compiler = webpack({
2424
entry: path.resolve(__dirname, 'js', 'app.js'),
2525
module: {
26-
loaders: [
26+
rules: [
2727
{
2828
test: /\.js$/,
2929
exclude: /node_modules/,
30-
loader: 'babel',
31-
query: {
30+
loader: 'babel-loader',
31+
options: {
3232
presets: ['es2015', 'react'],
3333
},
3434
},
3535
],
3636
},
3737
output: {filename: 'app.js', path: '/'},
38+
mode: 'development',
3839
});
3940
var app = new WebpackDevServer(compiler, {
4041
contentBase: '/public/',

0 commit comments

Comments
 (0)