Skip to content

Conversation

@bartoszglow
Copy link
Contributor

Fixes: #102 by replacing require keyword with acdlreq in the compiled version of ACDL in all files in dist folder using gulp implementation of derequire package.

};

gulp.task('lodash', shell.task(`lodash include=${configs.include.join(',')} -p -o ${configs.output}`));
gulp.task('lodash', shell.task(`lodash exports=node include=${configs.include.join(',')} -p -o ${configs.output}`));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does exports=node do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It ensures that lodash cli will build custom lodash script with export functions from nodejs api and will not use AMD or CommonJS style of exporting module. Without that parameter it did produce define keyword (to support AMD loaders) and was throwing some errors in console when requirejs was imported.

more info regarding lodash build: https://lodash.com/custom-builds

@jckautzmann jckautzmann merged commit ea8fdef into master Feb 16, 2021
@jckautzmann jckautzmann deleted the bugfix/browserify-vs-require-js-conflict-fix branch February 16, 2021 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

adobeDataLayer.push fails when some older versions of RequireJS already exist on page

3 participants