Update webpack and leaflet
This commit is contained in:
parent
60178de93b
commit
dd198d8aaa
6 changed files with 1123 additions and 2848 deletions
|
|
@ -8,10 +8,10 @@ const preBuildScripts = process.env.NO_FLOW == undefined ?
|
|||
: [];
|
||||
|
||||
const configPath = env => {
|
||||
if (env === true) {
|
||||
if (env.length < 3) {
|
||||
throw "No config file was provided.";
|
||||
}
|
||||
return path.resolve(__dirname, `config/${env}`);
|
||||
return path.resolve(__dirname, `config/${Object.keys(env)[2]}`);
|
||||
};
|
||||
|
||||
module.exports = env => ({
|
||||
|
|
@ -25,7 +25,7 @@ module.exports = env => ({
|
|||
alias: {
|
||||
'lodash': 'lodash-es',
|
||||
"leaflet": "leaflet/dist/leaflet-src.esm.js"
|
||||
}
|
||||
},
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
|
|
@ -51,6 +51,10 @@ module.exports = env => ({
|
|||
new HtmlWebpackPlugin({
|
||||
title: 'Space Map',
|
||||
template: 'index.ejs'
|
||||
})
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ['buffer', 'Buffer'],
|
||||
process: 'process/browser',
|
||||
}),
|
||||
]
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue