react-map-gl/test/apps/flow/webpack.config.js
2020-12-28 11:56:05 -08:00

37 lines
748 B
JavaScript

const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
app: './app.js'
},
devtool: 'source-map',
module: {
rules: [
{
// Compile ES2015 using babel
test: /\.js$/,
exclude: [/node_modules/],
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/env', '@babel/react', '@babel/flow']
}
}
]
}
]
},
// Optional: Enables reading mapbox token from environment variable
plugins: [
new HtmlWebpackPlugin({title: 'react-map-gl Example'}),
new webpack.EnvironmentPlugin(['MapboxAccessToken'])
]
};