Jump to content

Tip: Addons which use webpack


Recommended Posts

Hi everyone,

This topic will give you a useful tip if you use webpack to develop your Addons

I experienced a few conflicts with other modules which make use of webpack and solved the issue by renaming the webpack main function

This can be easily done by adding the key "jsonpFunction" to the "output" config of webpack

Example

output: {
    path: __dirname + "/../views/js",
    jsonpFunction: 'dsn_jsonpFunction'
}

Notice how I changed the name of the main function and added the prefix "dsn_"

This is to avoid conflicts with other modules that use webpack

You can also do the same by adding some prefix to your configuration

I hope someone finds this tip useful,

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...