Skip to content

Commit

Permalink
add commonjs static files
Browse files Browse the repository at this point in the history
  • Loading branch information
owenpearson committed Dec 1, 2020
1 parent 16c22e8 commit 36bb250
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions webpack.config.js
Expand Up @@ -221,6 +221,23 @@ const noEncryptionMinConfig = {
},
};

// We are using UMD in ably.js now so there is no need to build separately for CommonJS. These files are still being distributed to avoid breaking changes but should no longer be used.
const commonJsConfig = {
...browserConfig,
output: {
...baseConfig.output,
filename: 'ably-commonjs.js',
},
};

const commonJsNoEncryptionConfig = {
...noEncryptionConfig,
output: {
...baseConfig.output,
filename: 'ably-commonjs.noencryption.js',
},
};

module.exports = [
nodeConfig,
browserConfig,
Expand All @@ -229,4 +246,6 @@ module.exports = [
reactNativeConfig,
noEncryptionConfig,
noEncryptionMinConfig,
commonJsConfig,
commonJsNoEncryptionConfig,
];

0 comments on commit 36bb250

Please sign in to comment.