Skip to content

Commit

Permalink
Import JSON differently
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldzjap committed Jul 31, 2024
1 parent f2aed10 commit 96ab831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"scripts": {
"test": "cross-env NODE_ENV=test ./node_modules/.bin/jest",
"lint": "npx eslint --ext .ts,.js ./",
"development": "cross-env NODE_ENV=local npx rollup --config rollup.config.ts --configPlugin typescript",
"development": "cross-env NODE_ENV=local npx rollup --bundleConfigAsCjs --config rollup.config.ts --configPlugin typescript",
"dev": "npm run development",
"production": "cross-env NODE_ENV=production npx rollup --config rollup.config.ts --configPlugin typescript",
"production": "cross-env NODE_ENV=production npx rollup --bundleConfigAsCjs --config rollup.config.ts --configPlugin typescript",
"prod": "npm run production",
"watch": "cross-env NODE_ENV=local npx rollup --config rollup.config.ts --configPlugin typescript --watch"
"watch": "cross-env NODE_ENV=local npx rollup --bundleConfigAsCjs --config rollup.config.ts --configPlugin typescript --watch"
},
"repository": {
"type": "git",
Expand Down
3 changes: 1 addition & 2 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { nodeResolve } from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';

import pkg from './package.json' assert { type: 'json' };

const pkg = require('./package.json');

Check failure on line 6 in rollup.config.ts

View workflow job for this annotation

GitHub Actions / CI - OS ubuntu-latest, Node.js 20.x

Require statement not part of import statement

Check failure on line 6 in rollup.config.ts

View workflow job for this annotation

GitHub Actions / CI - OS ubuntu-latest, Node.js 22.x

Require statement not part of import statement

Check failure on line 6 in rollup.config.ts

View workflow job for this annotation

GitHub Actions / CI - OS macos-latest, Node.js 20.x

Require statement not part of import statement

Check failure on line 6 in rollup.config.ts

View workflow job for this annotation

GitHub Actions / CI - OS macos-latest, Node.js 22.x

Require statement not part of import statement
const local = process.env.NODE_ENV === 'local';

export default {
Expand Down

0 comments on commit 96ab831

Please sign in to comment.