mobify / commercecloud-ocapi-client

Salesforce Commerce Cloud Open Commerce API (OCAPI) for Node and browsers 🛒
MIT License
70 stars 31 forks source link

Comile to lib/es6 and lib/cjs and add package.json properties #4

Closed trainerbill closed 6 years ago

trainerbill commented 7 years ago

Keeps es6 export for webpack and rollup by exporting to lib/es6 and adding module: lib/es6 to package.json.

Adds commonjs compiling to lib/cjs and adds package.json main: lib/cjs for nodejs.

trainerbill commented 6 years ago

@kevinxh changes are made. there are errors on the UMD build that you all will need to look into. I am not a rollup guy.

src/index.js → dist/commercecloud-ocapi-client.umd.js... (!) Missing shims for Node.js built-ins Creating a browser bundle that depends on 'querystring'. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins (!) Missing global variable names Use options.globals to specify browser global variable names corresponding to external modules superagent (guessing 'superagent') querystring (guessing 'querystring')