yeoman / generator-webapp

A gulp.js generator for modern webapps
3.77k stars 708 forks source link

Lodash not found in dist folder #648

Closed tuannguyenminh2086 closed 7 years ago

tuannguyenminh2086 commented 7 years ago

Hello,

I installed the Lodash lib by: bower install lodash --save. After I run : gulp build. the lodash look like not include in plugins.js

here is how I add lodash in app folder. screen shot 2017-03-22 at 10 26 36 am

Hope to see your feedback

silvenon commented 7 years ago

So you have lodash available in development, but not in production, or not at all? Maybe all you need to do is override your bower.json to include that file. Something like:

{
  "dependencies": {
    "lodash": "~4.17.4"
  },
  "overrides": {
    "lodash": {
      "main": "dist/lodash.min.js"
    }
  }
}
tuannguyenminh2086 commented 7 years ago

I have lodash available in developement. but not in production. when I run in production mode by the command: gulp serve:dist . The browser will say : _ is not defined

Thanks for your quick help. I will do like you show and come back later. Many thanks

tuannguyenminh2086 commented 7 years ago

Thanks, It works.