Skip to content

Commit

Permalink
check if package.json has browser field
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianMairinger committed May 25, 2023
1 parent 4283659 commit 28c5545
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CI/browser/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import startServer from './server.mjs';
import { promises as fs } from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

Expand All @@ -23,4 +22,9 @@ browser.close()
// server.close()


import reqPackageJson from 'req-package-json';
const packageJson = reqPackageJson()
if (packageJson.browser === undefined) throw new Error("package.json must have a browser field")



0 comments on commit 28c5545

Please sign in to comment.