WebStormRequireJsPlugin icon indicating copy to clipboard operation
WebStormRequireJsPlugin copied to clipboard

`paths` in config file is ignored

Open danielgindi opened this issue 8 years ago • 2 comments

My config file:

requirejs.config({
    baseUrl: '/js',
    paths: {
        'jquery': '/js/deps/jquery-3.1.1.min'
    }
});
requirejs(['src/main']);

example.js

define([
    'jquery' // <-- appears red, broken.
], function ($) {

});

danielgindi avatar Feb 23 '17 10:02 danielgindi

This is a basic feature of Require.js and without the configuration being used/parsed this plugin is not really useful, since most of the auto-completions will not work when using the paths or shim configuration. This is especially important in frameworks, where the JS files are spread across several root-folder (i.e. Magento or TYPO3-Backend).

feeela avatar Jul 03 '18 10:07 feeela

Well I'm moving away from AMD anyway, as browsers started to support ES6 already, so dev env is easy. And in production you most probably take a babelified version.

danielgindi avatar Jul 03 '18 14:07 danielgindi