You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please take a moment to find out whether your idea fits with the scope and aims of the project
Is your feature request related to a problem? Please describe.
From #61
Can you use export in Drift.js? Mixing module formats causes issues when using webpack to convert modules. The old way didn't present an issue when we used Babel, but webpack appears to be more strict. We switched because webpack can "tree shake" unused modules.
Describe the solution you'd like
Use export default rather than module.exports. The problem with changing the usage right now is that it breaks the UMD build for direct browser sourcing (i.e. window.Drift). Another bundler will have to be used, such as Webpack, to support this.
Describe alternatives you've considered
Browserify: this tool is currently used but doesn't seem to have a way to support export default in this way.
The text was updated successfully, but these errors were encountered:
I'll try to put together an example of using rollup with babel to bundle. Webpack is great for building application bundles, but I like rollup better for libraries.
Before you submit:
Is your feature request related to a problem? Please describe.
From #61
Describe the solution you'd like
Use
export default
rather thanmodule.exports
. The problem with changing the usage right now is that it breaks the UMD build for direct browser sourcing (i.e.window.Drift
). Another bundler will have to be used, such as Webpack, to support this.Describe alternatives you've considered
export default
in this way.The text was updated successfully, but these errors were encountered: