-
Notifications
You must be signed in to change notification settings - Fork 93
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
bundling the package for production issue #70
Comments
Correct, it would be empty.
Is this currently causing a problem in your build process? |
That makes sense for typescript typing. It would build without issue however when the bundle was loaded it threw an error stating that Toast was undefined. When I supplied the empty class to be exported it ran fine with the production bundle. |
Can you please provide an example of your build process and how you are consuming the end result? The file is fully accessible. This seems to be bundler-centric. |
We are experiencing the same issue with our build as well. The build process is running fine but the final bundle.js throws an error "Uncaught TypeError: Cannot read property 'Toast' of undefined". We are using gulp to build and bundle our project, which reads off systemjs.config.js. Has something changed recently? We didn't have this kind of problem before. |
@ruiwanguk not that I am aware of. The |
@Stabzs , when we load our webapp, there is no stack track as such. Only the error message "Uncaught TypeError: Cannot read property 'Toast' of undefined, angular2-toaster.js:2" |
@Stabzs, btw, we are using version 1.0.0 |
@ruiwanguk does the issue persist in 1.0.1? In addition, are you able to provide a small sample gulp config of how you are bundling just the library source? |
@Stabzs Does this help? builder.loadConfig('systemjs.config.js') |
@ruiwanguk What does your systemjs.config look like? |
@ruiwanguk does something like jspm/jspm-cli#1127 address your issue? If not, it seems like it may be prudent to remove the |
@markhatchell are you using SystemJS as well for your module-loading? And how are you bundling it? |
I noticed that when I bundled the package the toast.js file was empty that was included in the npm module. So I created a placeholder file and replaced it, now it bundles properly and exports the Toast class.
It would appear that something is wrong with the build process of the module because when I cloned the repo and built it for myself, the toast.js file was still empty.
Here is what I used to replace the contents of toast.js:
The text was updated successfully, but these errors were encountered: