Skip to content

Commit

Permalink
fix(umd): update script to accomodate Weback CLI v4
Browse files Browse the repository at this point in the history
  • Loading branch information
lalli-flores committed Feb 24, 2021
1 parent c37bbc4 commit d38b847
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tooling/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ exports.buildUMDScript = async function buildUMDScript() {

// reminder: samples:build calls this script, not webpack
// hence we must call webpack here
const [cmd, ...args] = `webpack --color ${(process.env.NODE_ENV === 'development') ? '--mode development' : '--mode production'} --umd`.split(' ');
const [cmd, ...args] = `webpack --color ${(process.env.NODE_ENV === 'development') ? '--mode development' : '--mode production'} --env umd`.split(' ');
const webpack = spawn(cmd, args, {
stdio: 'pipe',
// Spawn fix for Windows
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = (env = process.env.NODE_ENV || 'production', args) => ({
library: 'Webex',
libraryTarget: 'umd',
sourceMapFilename: '[file].map',
path: args && args.umd ? // samples:test fix since its called as a function
path: args && args.env && args.env.umd ? // samples:test fix since its called as a function
`${path.resolve(__dirname)}/packages/node_modules/webex/umd` :
`${path.resolve(__dirname)}/packages/node_modules/samples`
},
Expand Down

0 comments on commit d38b847

Please sign in to comment.