1234567891011121314151617181920212223242526272829303132 |
- const path = require('path');
- const webpack = require('webpack');
- module.exports = {
- entry: ['./lofig.js'],
- output: {
- path: path.resolve('./dist'),
- filename: 'lofig.min.js'
- },
- resolveLoader: {
- root: path.join(__dirname, 'node_modules'),
- },
- module: {
- loaders: [
- {
- test: /\.js$/,
- loader: 'babel',
- exclude: /node_modules/,
- query: {
- presets: ['es2015']
- }
- }
- ]
- },
- plugins: [
- new webpack.HotModuleReplacementPlugin(),
- new webpack.ProvidePlugin({
- 'Promise': 'bluebird',
- 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
- }),
- ]
- };
|