Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace keyword require by acdlreq to avoid conflicts with requirejs #114

Merged
merged 1 commit into from
Feb 16, 2021

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.

@@ -17,5 +17,5 @@ module.exports = function(gulp) {
output: 'custom-lodash.js'
};

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
2 participants