0
I am using Gulp to compile my JS files.
I have TWO folders where there are JS files, one INSIDE the project (daughter folder themes/) and another this FORA (parent folder modules/).
When using the:
babel({
minified: true,
presets: ["env"]
}))
js files from within the project (folder themes/) compile normally, but those who are OUT give error in presets: ["env"].
Error: Couldn't find preset "env" relative to directory "C:\\projetos\\...
It seems that the presets: ["env"] cannot see the parent folders, in this case what is above the folder themes/.
Obs 1: The archive gulpfile.js that rotates the presets: ["env"] this inside the folder themes/.
Obs 2: Any other Gulp function, such as copying files from the folder modules/ into the folder themes/ works normally, it’s just the presets: ["env"] that gives the error.
Folder structure:
projetos/
|-modules/
|-js/file-module.js
|-profile/
|-contrib/
|-themes/
|-js/file-theme.js
node_modules/
gulpfile.js
Short question:
How do I make for the preset: ["env"] that runs from within the file gulpfile.js view the file modules/js/file-module.js recalling that the gulpfile.js this inside the folder themes/?