Skip to content

Commit

Permalink
Merge branch 'poc/new-checkout-interface' into feat/WT-1817
Browse files Browse the repository at this point in the history
  • Loading branch information
sharonsheah committed Oct 31, 2023
2 parents 0941d10 + c398e05 commit b8115ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 1 addition & 6 deletions packages/checkout/widgets-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,10 @@
"private": true,
"scripts": {
"build": "rollup --config rollup.config.js",
"build:dist": "yarn build && yarn dist:sample",
"dist:sample": "mkdir -p ../widgets-sample-app/public/lib/js && cp build/static/js/main.*.js ../widgets-sample-app/public/lib/js/imtbl-checkout.js",
"dist:sdk": "mkdir -p ../../../sdk/dist/browser && cp build/static/js/main.*.js ../../../sdk/dist/browser/checkout.js",
"eject": "react-app-rewired eject",
"build:local": "yarn build && mkdir -p ../widgets-sample-app/public/lib/js && cp dist/widgets.js ../widgets-sample-app/public/lib/js/widgets.js",
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
"lint:fix": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0 --fix",
"start": "rollup --config rollup.config.js --watch",
"start:dev": "CHECKOUT_DEV_MODE=true yarn start",
"start:local": "yarn build && mkdir -p ../widgets-sample-app/public/lib/js && cp dist/widgets.js ../widgets-sample-app/public/lib/js/widgets.js",
"test": "jest test --passWithNoTests",
"test:cypress": "NODE_ENV=test cypress run --component --headless",
"test:cypress:open": "NODE_ENV=test cypress open --component --browser electron",
Expand Down
5 changes: 2 additions & 3 deletions packages/checkout/widgets-lib/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import resolve from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import replace from '@rollup/plugin-replace';
import nodePolyfills from 'rollup-plugin-polyfill-node';

const defaultPlugin = [
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
'process.env.CHECKOUT_DEV_MODE': JSON.stringify(process.env.CHECKOUT_DEV_MODE || 'false'),
'process.env.CHECKOUT_LOCAL_MODE': JSON.stringify(process.env.CHECKOUT_LOCAL_MODE || 'false'),
'process.versions': JSON.stringify(process.versions || {})
}),
typescript()
]
Expand Down Expand Up @@ -43,6 +41,7 @@ export default [
}),
json(),
commonjs(),
nodePolyfills(),
...defaultPlugin,
terser(),
]
Expand Down

0 comments on commit b8115ea

Please sign in to comment.