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

webpack build error #26

Closed
arshtepe opened this issue Apr 21, 2015 · 4 comments
Closed

webpack build error #26

arshtepe opened this issue Apr 21, 2015 · 4 comments

Comments

@arshtepe
Copy link

Not builded if connect through webpack require (). Need changed this code

((function (undefined) {
    if (typeof define === 'function' && define.amd) {
        return define;
    } else if (typeof module !== 'undefined' && module.exports) {
        return function (factory) { module.exports = factory(); };
    } else if (typeof window !== 'undefined') {
        return function (factory) { window.MobileDetect = factory(); };
    } else {
        // please file a bug if you get this error!
        throw new Error('unknown environment');
    }
})());

on this

((function (undefined) {

    if (typeof module !== 'undefined' && module.exports) {
        return function (factory) { module.exports = factory(); };
    }
    else if (typeof define === 'function' && define.amd) {
        return define;
    } else if (typeof window !== 'undefined') {
        return function (factory) { window.MobileDetect = factory(); };
    } else {
        // please file a bug if you get this error!
        throw new Error('unknown environment');
    }
})());
@hgoebl
Copy link
Owner

hgoebl commented Apr 21, 2015

Thanks for the suggestion! Have you tested it? I personally don't have an environment to test under Webpack.

@arshtepe
Copy link
Author

Yes of course, i changed code on fixed and use now in my project.

@mrsum
Copy link

mrsum commented May 7, 2015

This is actually for this moment? can you apply this code and reformat npm plugin?

@hgoebl
Copy link
Owner

hgoebl commented May 7, 2015

I'll do it on 10-May, before there is absolutely no time, sorry.

@hgoebl hgoebl closed this as completed in 84619ea May 10, 2015
hgoebl added a commit that referenced this issue May 10, 2015
    - use Mobile-Detect@2.8.13 (fix #27)
    - fix #26 webpack build error
hgoebl added a commit that referenced this issue May 10, 2015
    - use Mobile-Detect@2.8.13 (fix #27)
    - fix #26 webpack build error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants