Skip to content

Commit

Permalink
Prefer buildins for browser (#67)
Browse files Browse the repository at this point in the history
* Prefer buildins for browser output

* Version 0.1.1

* Updated yarn

* rollup

* rollup-polyfills

* rollup-polyfills

* rollup

* rollup

* rollup

* [ Dependencies ] Moved rollup dependencies as development

---------

Co-authored-by: rlajous <[email protected]>
  • Loading branch information
jm42 and rlajous authored Nov 13, 2023
1 parent 45060a7 commit 25113bc
Show file tree
Hide file tree
Showing 9 changed files with 1,701 additions and 877 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.0",
"@types/jest": "^29.5.0",
"@types/node": "^18.16.0",
Expand All @@ -41,6 +41,8 @@
"jest-mock-extended": "^3.0.4",
"prettier": "^2.8.6",
"rollup": "^3.20.2",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-typescript2": "^0.31.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/drops/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/drops",
"version": "0.1.0",
"version": "0.1.1",
"description": "Drops module for the poap.js library",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/moments/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/moments",
"version": "0.1.0",
"version": "0.1.1",
"description": "Moments module for the poap.js library",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/performance/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/performance",
"version": "0.1.0",
"version": "0.1.1",
"description": "Performance module for the poap.js library",
"type": "module",
"main": "dist/cjs/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/poaps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/poaps",
"version": "0.1.0",
"version": "0.1.1",
"description": "Poaps module for the poap.js library",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/providers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/providers",
"version": "0.1.0",
"version": "0.1.1",
"description": "Providers module for the poap.js library",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/utils",
"version": "0.1.0",
"version": "0.1.1",
"description": "Utils module for the poap.js library",
"type": "module",
"main": "dist/cjs/index.cjs",
Expand Down
8 changes: 7 additions & 1 deletion rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import path from 'path';
import nodePolyfills from 'rollup-plugin-node-polyfills';

const pkg = require(path.resolve(process.cwd(), 'package.json'));

Expand All @@ -19,10 +20,12 @@ const configs = [
},
cache: false,
plugins: [
nodeResolve({ browser: true }),
typescript({
tsconfig: `./tsconfig.json`,
}),
nodeResolve({
browser: true,
}),
commonjs(),
json(),
],
Expand All @@ -43,14 +46,17 @@ const configs = [
exports: 'named',
},
],
external: ['axios'],
plugins: [
typescript({
tsconfig: `./tsconfig.json`,
}),
nodeResolve({
preferBuiltins: true,
browser: false,
}),
commonjs(),
nodePolyfills(),
json(),
],
},
Expand Down
Loading

0 comments on commit 25113bc

Please sign in to comment.