-
Notifications
You must be signed in to change notification settings - Fork 33
tests fail when environment=production #86
Comments
@ctcpip can you share the test repo please? |
Production build ( Can also be observed using |
@GCheung55 @acoustep Production build/test also fails on this repo itself. It seems this addon is broken for production use.
|
opened PR #87 to add production test in the Travis build |
Adding some more info to this. Issue seems to be resolved when turning on sourcemaps for production. Plugin Version:
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
'ember-cli-foundation-6-sass': {
'foundationJs': 'all'
},
sourcemaps: {
enabled: true,
extensions: ['js']
},
});
return app.toTree();
}; |
@adambullmer thanks for that. Will use as a temporary workaround |
I can reproduce the problem when
One possible approach is to have each component import the plugin. E.g. @acoustep what are your thoughts here? |
The approach to have components import their corresponding plugin also prevents users from being able to leverage the jQuery plugin syntax: Ember is moving away from depending on jQuery and Foundation-sites also plans to removing jQuery on their 7.x roadmap. |
I'm also having this problem. TL;DR: Foundation works in error: Ember details:
app/components/cf-move-nav.js didInsertElement() {
this._super(...arguments);
let element = this.$('.cf-MoveNav-navBar');
new Foundation.Sticky(element);
// re-initialize sticky plugin to guarantee stick in all browsers/mobiles
// https://github.com/zurb/foundation-sites/issues/8394#issuecomment-239599386
this.$(window).trigger('load.zf.sticky');
}, ember-cli-build.js module.exports = function(defaults) {
let app = new EmberApp(defaults, {
'ember-cli-foundation-6-sass': {
'foundationJs': 'all',
},
// ... have not yet found a workaround 😭 . Plz let me know if you found one. |
@adambullmer Interesting, I had sourcemaps enabled @GCheung55 were you able to get production builds working with a workaround? @ctcpip what workaround ended up working for you? |
@0xadada the workaround above worked for me: #86 (comment) |
we need a real fix for this issue. the workaround is far from ideal. |
@ctcpip I tried #86 (comment) but it didn't work in 2.16. |
Sorry for the delay. I have a promising lead using Rollup.js to package up I've got a bit of cleanup and testing to do. I'm hoping to get this done in the next week. |
"Next week" turned into next month, sorry for that. Just an update. I've finally made time to switch over to Rollup in PR #77. |
I still love you 👌
…-------- Original Message --------
On Dec 27, 2017, 19:05, Garrick Cheung wrote:
"Next week" turned into next month, sorry for that.
Just an update. I've finally made time to switch over to Rollup in PR [#77](#77).
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#86 (comment)), or [mute the thread](https://github.com/notifications/unsubscribe-auth/AADIBz9lPRef8nGVQw2DgFZizmAXQ4-Pks5tEtthgaJpZM4O293k).
|
Upgraded to the latest version of this addon which no longer uses bower.
Now when running
ember test --environment=production
, integration and acceptance tests fail withReferenceError: Foundation is not defined
I created a brand new app and was able to reproduce the problem.
The text was updated successfully, but these errors were encountered: