Skip to content

Commit

Permalink
fix(5019): check if mapbox key is added before generating the product…
Browse files Browse the repository at this point in the history
…ion build.
  • Loading branch information
skippednote committed Jun 23, 2020
1 parent 2d5f1a6 commit 80293a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions site/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const mode = process.env.NODE_ENV;
const dev = mode === 'development';
const legacy = !!process.env.SAPPER_LEGACY_BUILD;

if (!dev && !process.env.MAPBOX_ACCESS_TOKEN) {
throw Error('MAPBOX Access Token is missing. Please add the token in the .env file to generate the production build.');
}

const onwarn = (warning, onwarn) => (warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) || onwarn(warning);
const dedupe = importee => importee === 'svelte' || importee.startsWith('svelte/');

Expand Down

0 comments on commit 80293a2

Please sign in to comment.