-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 module name #210
Comments
I have less knowledge about umd/amd, but you can try editing the webpack configuration here - https://github.com/apexcharts/apexcharts.js/blob/master/webpack.config.js You can change Or - as an option - I can provide a separate file specifically for amd |
A separate file should be the safer and fastest solution, if you feel confident too i think you can go and provide a separate amd build (normal + minified). |
Cool, I'll try that |
According to the webpack's doc, you can set the umdNamedDefine to false. Just apply this and you don't need to provide a separate build, i tested it and it's working as expected: (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory); // << anonymous define finally, we got it!
else if(typeof exports === 'object')
exports["ApexCharts"] = factory();
else
root["ApexCharts"] = factory();
})(this, function() { |
Alright, the change will be released in 2.2.4 |
Hi, as i see in dist file, the UMD builded code is:
I'm currently using require.js to import this module.
Usually in AMD projects, using the module name in 3rd party dependency give some problems during imports (undefined references), can you make it anonymous as the example below please?
The text was updated successfully, but these errors were encountered: