In a nodejs express.js application, and trying to build the app using babel for cross browser compatibility.
package.json scripts:
"scripts": { "start": "node dist/app.js", "build": "babel src -d dist" } On running npm build and check my build folder everything builds correctly except my non-js files like [.html,.css,.ejs]. At the moment just copied those file to the build folder in their respective sub directories and everything works fine.
I have even tried "build": "babel src -d dist --ignore *.css,*.ejs,*.png,*.jpg"
Is there a way to do this in a better way instead of copying the non-js files. Thanks in advance any help will be highly appreciated.
--ignore *.css,*.html,*.ejsshould work. babeljs.io/docs/en/babel-cli#ignore-files--copy-filesflag doesn't take arguments. babeljs.io/docs/en/babel-cli#copy-files