javascript - Best Way to Have Webpack Manage Quirky AMD Defines -
i'm working large js module base (for front-end code) uses amd style definitions. typically this:
define('twittermodule', [ 'vendor/jquery/jquery', 'vendor/moment/moment', 'vendor/jquery/jquery.ie.cors' ], function ($, moment) { ...
the problem dependency declarations don't represent dependencies are. without directory resolution magic:
define('twittermodule', [ __dirname + '/vendor/jquery/content/scripts/jquery', __dirname + '/vendor/moment/content/scripts/moment', __dirname + '/vendor/jquery/content/scripts/jquery.ie.cors' ], function ($, moment) { ...
so i'm trying figure out cleanest way resolve these directory problems. namely, define root path , inject '/content/scripts' part paths webpack receives. webpack resolve , webpack shims possibly solve this, i'm looking feedback has experience addressing weird amd definitions keep me focused on best possible solution.
couldn't map vendor
in webpack config's resolve
group?