Skip to content

Commit c3bbdb4

Browse files
committed
Added babel for JS files
1 parent 7b61c22 commit c3bbdb4

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"ts-loader": "^5.3.0",
4040
"vizceral": "^4.7.3",
4141
"webpack": "^4.26.0",
42-
"webpack-cli": "^3.2.3"
42+
"webpack-cli": "^3.2.3",
43+
"uglifyjs-webpack-plugin": "1.3.0"
4344
},
4445
"dependencies": {
4546
"lodash": "^4.17.11",

src/graph/GraphGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var _ = require('lodash');
1+
import _ from 'lodash';
22

33
class GraphGenerator {
44

webpack.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ module.exports = {
4949
},
5050
module: {
5151
rules: [
52+
{
53+
test: /\.js$/,
54+
exclude: /(node_modules|bower_components)/,
55+
use: {
56+
loader: 'babel-loader',
57+
options: {
58+
presets: ['@babel/preset-env']
59+
}
60+
}
61+
},
5262
{
5363
test: /\.tsx?$/,
5464
loaders: [

0 commit comments

Comments
 (0)