From 22220c5992ed660ec6ed805b4275f9ec1378f60c Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 18 Aug 2017 14:05:49 +1000 Subject: webpack.config.js: Use babel-loader instead of babili-webpack-plugin --- webpack.config.js | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index 7fbcf86..183d29f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,41 +1,35 @@ const webpack = require('webpack'); const path = require('path'); -const BabiliPlugin = require("babili-webpack-plugin"); module.exports = [ { entry: './src/fengari.js', target: 'web', + node: false, output: { path: path.resolve(__dirname, 'dist'), filename: 'fengari.js', library: 'fengari' }, - externals: { - "crypto": "crypto" + module: { + rules: [ + { + test: [/\.js$/], + loader: 'babel-loader', + options: { + presets: [['env', { + "targets": { + "browsers": ["last 2 versions", "safari >= 7"] + } + }]] + } + } + ] }, plugins: [ new webpack.DefinePlugin({ WEB: JSON.stringify(true), }) ] - }, - { - entry: './src/fengari.js', - target: 'web', - output: { - path: path.resolve(__dirname, 'dist'), - filename: 'fengari.min.js', - library: 'fengari' - }, - externals: { - "crypto": "crypto" - }, - plugins: [ - new webpack.DefinePlugin({ - WEB: JSON.stringify(true), - }), - new BabiliPlugin() - ] } ]; -- cgit v1.2.3-54-g00ecf