Expose all utils function as @utils
This commit is contained in:
parent
552468e6d9
commit
c343893d00
2 changed files with 53 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
const path = require('path');
|
||||
const { environment } = require('@rails/webpacker');
|
||||
|
||||
// By default don't transpile JS files in ./node_modules – except for some specific modules.
|
||||
|
@ -14,4 +15,12 @@ babelLoader.exclude = function(modulePath) {
|
|||
);
|
||||
};
|
||||
|
||||
const resolve = {
|
||||
alias: {
|
||||
'@utils': path.resolve(__dirname, '..', '..', 'app/javascript/shared/utils')
|
||||
}
|
||||
};
|
||||
|
||||
environment.config.merge({ resolve });
|
||||
|
||||
module.exports = environment;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue