Skip to content

Commit 27e06f0

Browse files
authored
Merge pull request #92 from /issues/91-babel-update
Upgrade babel to 7.x.x
2 parents e9629a4 + 5f8577a commit 27e06f0

File tree

3 files changed

+2291
-1769
lines changed

3 files changed

+2291
-1769
lines changed

dashboard/frontend/config/webpack.common.config.js

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
const webpack = require('webpack');
2-
const CleanPlugin = require('clean-webpack-plugin');
3-
const HtmlPlugin = require('html-webpack-plugin');
4-
const ExtractTextPlugin = require('extract-text-webpack-plugin');
5-
const commonPaths = require('./common-paths');
1+
const webpack = require("webpack");
2+
const CleanPlugin = require("clean-webpack-plugin");
3+
const HtmlPlugin = require("html-webpack-plugin");
4+
const ExtractTextPlugin = require("extract-text-webpack-plugin");
5+
const commonPaths = require("./common-paths");
66

77
const config = {
88
entry: {
9-
main: ['./src/index.js']
9+
main: ["./src/index.js"]
1010
},
1111
output: {
12-
filename: '[name].js',
12+
filename: "[name].js",
1313
path: commonPaths.outputPath
1414
},
1515
module: {
1616
rules: [
1717
{
18-
enforce: 'pre',
18+
enforce: "pre",
1919
test: /\.js$/,
20-
loader: 'eslint-loader',
20+
loader: "eslint-loader",
2121
options: {
2222
failOnWarning: false,
2323
failOnerror: true
@@ -29,23 +29,24 @@ const config = {
2929
exclude: /(node_modules|bower_compontents)/,
3030
use: [
3131
{
32-
loader: 'babel-loader',
32+
loader: "babel-loader",
3333
options: {
34-
presets: ['es2015', 'react', 'stage-0']
34+
presets: ["@babel/preset-env"]
3535
}
3636
}
37-
],
38-
},{ test: /\.(woff|woff2|eot|ttf)$/, loader: 'url-loader?limit=100000' },
37+
]
38+
},
39+
{ test: /\.(woff|woff2|eot|ttf)$/, loader: "url-loader?limit=100000" },
3940
{
4041
test: /\.s?css$/,
4142
use: ExtractTextPlugin.extract({
42-
fallback: 'style-loader',
43+
fallback: "style-loader",
4344
use: [
4445
{
45-
loader: 'css-loader'
46+
loader: "css-loader"
4647
},
4748
{
48-
loader: 'sass-loader'
49+
loader: "sass-loader"
4950
}
5051
]
5152
})
@@ -54,9 +55,9 @@ const config = {
5455
test: /\.(png|svg|jpg|gif)$/,
5556
use: [
5657
{
57-
loader: 'file-loader',
58+
loader: "file-loader",
5859
options: {
59-
name: 'images/[name].[ext]'
60+
name: "images/[name].[ext]"
6061
}
6162
}
6263
],
@@ -69,18 +70,18 @@ const config = {
6970
cacheGroups: {
7071
commons: {
7172
test: /[\\/]node_modules[\\/]/,
72-
name: 'vendors',
73-
chunks: 'all'
73+
name: "vendors",
74+
chunks: "all"
7475
}
7576
}
7677
}
7778
},
7879
plugins: [
7980
new webpack.ProgressPlugin(),
80-
new ExtractTextPlugin('[name].css'),
81-
new CleanPlugin(['../public'], { allowExternal: true }),
81+
new ExtractTextPlugin("[name].css"),
82+
new CleanPlugin(["../public"], { allowExternal: true }),
8283
new HtmlPlugin({
83-
filename: 'index.html',
84+
filename: "index.html",
8485
template: commonPaths.template,
8586
favicon: commonPaths.favicon,
8687
inject: true

0 commit comments

Comments
 (0)