Browse Source

Add babel to webpack

experimental
Paweł Jedwabny 4 years ago
parent
commit
981ac8247b
3 changed files with 22 additions and 1 deletions
  1. +4
    -0
      .babelrc
  2. +6
    -0
      package.json
  3. +12
    -1
      webpack.config.js

+ 4
- 0
.babelrc View File

@@ -0,0 +1,4 @@
{
"presets": ["env"],
"plugins": ["transform-runtime"]
}

+ 6
- 0
package.json View File

@@ -21,6 +21,11 @@
},
"homepage": "https://github.com/Telaxus/EPESI#readme",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"css-loader": "^0.28.7",
"expose-loader": "^0.7.3",
"file-loader": "^0.11.2",
@@ -32,6 +37,7 @@
"url-loader": "^0.5.9"
},
"dependencies": {
"babel-runtime": "^6.26.0",
"bootstrap": "^3.3.7",
"chart.js": "^2.7.0",
"jquery": "^2.x.x",


+ 12
- 1
webpack.config.js View File

@@ -14,7 +14,18 @@ module.exports = {
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url-loader?limit=10000&mimetype=application/octet-stream" },
{test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file-loader" },
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url-loader?limit=10000&mimetype=image/svg+xml" },
{test: /\.(png|jpg|gif)$/, loader: "file-loader" }
{test: /\.(png|jpg|gif)$/, loader: "file-loader" },
{
test: /\.js$/,
exclude: /(node_modules|bower_components|libs)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env'],
plugins: ["transform-class-properties"]
}
}
}
]
}
};

Loading…
Cancel
Save