meteor minified with production flag fails to load certain files

怎甘沉沦 提交于 2019-12-22 10:19:42

问题


I am not getting any errors from the server or the browser console but my application seems to break when i minify or use the --production flag. I have went back to a revision/changeset that i recall working with meteor deploy and it still fails. Has anyone else faced this problem ?

I should mention, i just ran this with an older version of meteor and it works. Meteor version 0.7.0.1 looks like might be the problem?

EDIT: Running 0.6.6.3

I ran meteor --release 0.6.6.3 --production to minify and use an older version of meteor. This works perfectly, any one know if the bundling process has changed in the latest version of meteor ?


回答1:


Way back with v0.6.4.1 we had issues if we had @media statements split across multiple files. Putting them all in one file avoided the css minification problems. May work for your @import statements as well.

-- update --

"I looked back at all my @import statements and found one that was commented out and saw that in production my css file had been corrupted." @Warz in comments

So it looks like commenting out @import statements is not supported in the css minifier as of Meteor v0.7.0.1.




回答2:


Something went wrong while minified javascript files. I temporarily deploy without minifying to avoid this kind of problems:

meteor deploy --debug yoursite.meteor.com


来源:https://stackoverflow.com/questions/20864884/meteor-minified-with-production-flag-fails-to-load-certain-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!