In this post, we have been able to demonstrate how to transpile code written with ES6 import and export syntax via webpack and the webpack-cli package.
To build with webpack we can run npm run watch
locally for development builds. For production builds we can run npm run build
.
The input file is located in the src
directory which contains the entry point for our webpack build. The output files are located in the dist
folder.