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

UMD generated by rollup not recognized #119

Open
betabong opened this issue May 16, 2017 · 1 comment
Open

UMD generated by rollup not recognized #119

betabong opened this issue May 16, 2017 · 1 comment

Comments

@betabong
Copy link

Rollup is a relatively new module bundler (es6) that can generate UMD style output. Unfortunately the code is not recognized by AMDclean.

It goes like this (after Require Optimizer):

(function(global, factory) {
	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
	typeof define === 'function' && define.amd ? define(factory) :
	(global.Vue = factory());
})(this, (function() {
  return true;
}))

Live here: http://gregfranko.com/amdclean/?code=(function(global%2C%20factory)%20%7B%0A%09typeof%20exports%20%3D%3D%3D%20'object'%20%26%26%20typeof%20module%20!%3D%3D%20'undefined'%20%3F%20module.exports%20%3D%20factory()%20%3A%0A%09typeof%20define%20%3D%3D%3D%20'function'%20%26%26%20define.amd%20%3F%20define(factory)%20%3A%0A%09(global.Vue%20%3D%20factory())%3B%0A%7D)(this%2C%20(function()%20%7B%0A%20%20return%20true%3B%0A%7D))

amdclean only recognizes if the conditions are put into if-else.

@emilefokkema
Copy link

This could be solved by #125.

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

No branches or pull requests

2 participants