diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 36 |
1 files changed, 15 insertions, 21 deletions
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() - ] } ]; |