mirror of
https://github.com/visgl/react-map-gl.git
synced 2025-12-08 20:16:02 +00:00
40 lines
782 B
JavaScript
40 lines
782 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: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader']
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
exclude: [/node_modules/],
|
|
use: [
|
|
{
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/env', '@babel/react']
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
// Optional: Enables reading mapbox token from environment variable
|
|
plugins: [
|
|
new HtmlWebpackPlugin({title: 'react-map-gl Example'}),
|
|
new webpack.EnvironmentPlugin({MapboxAccessToken: ''})
|
|
]
|
|
};
|