-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(browser): create separate build for browser and nodejs
- Loading branch information
Showing
6 changed files
with
79 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,38 @@ | ||
module.exports = { | ||
presets: [ | ||
'@babel/typescript', | ||
[ | ||
'@babel/preset-env' | ||
] | ||
module.exports = { | ||
presets: [ | ||
'@babel/typescript', | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: '14', | ||
}, | ||
}, | ||
], | ||
plugins: [ | ||
'lodash', | ||
'@babel/proposal-class-properties' | ||
] | ||
], | ||
plugins: ['lodash', '@babel/proposal-class-properties'], | ||
env: { | ||
browser: { | ||
plugins: [ | ||
[ | ||
'@babel/plugin-transform-runtime', | ||
{ | ||
regenerator: true, | ||
}, | ||
], | ||
], | ||
presets: [ | ||
'@babel/typescript', | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
chrome: '58', | ||
ie: '11', | ||
}, | ||
}, | ||
], | ||
], | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,9 @@ | |
"name": "apollo-proxy-cache", | ||
"version": "4.1.0", | ||
"description": "Provides an apollo-link and express (proxy) middleware setup to support a local `@cache` directive", | ||
"main": "dist/index.js", | ||
"main": "dist/node/index.js", | ||
"browser": "dist/browser/index.js", | ||
"typings": "dist/node/index.d.ts", | ||
"repository": "[email protected]:BowlingX/apollo-proxy-cache.git", | ||
"author": "David Heidrich <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -14,15 +16,14 @@ | |
"@types/iltorb": "^2.3.2", | ||
"@types/express": "^4.17.11", | ||
"@types/lodash": "^4.14.168", | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.2.2", | ||
"@babel/node": "^7.5.5", | ||
"@babel/plugin-proposal-class-properties": "^7.5.5", | ||
"@babel/cli": "^7.13.0", | ||
"@babel/core": "^7.13.8", | ||
"@babel/node": "^7.13.0", | ||
"@babel/plugin-transform-runtime": "^7.13.9", | ||
"@babel/plugin-proposal-class-properties": "^7.13.0", | ||
"@babel/plugin-proposal-export-default-from": "^7.2.0", | ||
"@babel/plugin-proposal-export-namespace-from": "^7.2.0", | ||
"@babel/plugin-transform-flow-strip-types": "^7.2.3", | ||
"@babel/preset-env": "^7.2.3", | ||
"@babel/preset-flow": "^7.0.0", | ||
"@babel/preset-env": "^7.13.9", | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
"@semantic-release/git": "^9.0.0", | ||
|
@@ -42,12 +43,14 @@ | |
"@babel/preset-typescript": "^7.10.4", | ||
"prettier": "^2.2.1", | ||
"eslint-config-prettier": "^6.15.0", | ||
"babel-plugin-lodash": "^3.3.4" | ||
"babel-plugin-lodash": "^3.3.4", | ||
"cross-env": "^7.0.3" | ||
}, | ||
"scripts": { | ||
"prepare": "yarn run build:clean && yarn run build:lib && yarn run build:types", | ||
"prepare": "yarn run build:clean && yarn run build:lib && yarn run build:lib:browser && yarn run build:types", | ||
"build:clean": "rimraf dist", | ||
"build:lib": "babel src -d dist --extensions \".ts\"", | ||
"build:lib": "babel src -d dist/node --extensions \".ts\"", | ||
"build:lib:browser": "cross-env BABEL_ENV=browser babel src -d dist/browser --extensions \".ts\"", | ||
"build:types": "tsc --project tsconfig.types.json", | ||
"test": "yarn eslint src && tsc", | ||
"test-server": "babel-node test/index.js", | ||
|
@@ -80,11 +83,6 @@ | |
"lodash": "^4.17.21" | ||
}, | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
"targets": { | ||
"chrome": "58", | ||
"ie": "11", | ||
"node": "12" | ||
"node": ">=14" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters