from SpaTheory.co x Macy Rodman
Simple Webpack configuration for your next a-frame project. You can use two different build processes. Development and production.
You'll need NodeJS. I used v11.4.0 for the development process. You can use nvm to easily install and manage different versions of node on your system.
node -v
# or
nvm current
If you have everything set up just cd
into the project directory and type npm install
into the terminal
cd INTO_PROJECT_FOLDER
npm install
If you type npm start in the console the development config is run. The main.js file is automatically injected into the header and a new browser tab opens with hot module replacement.
npm start
The production command creates a dist folder for you. Including a minified file and hashed filename. Also the index.html is minified, comments and whitespace removed.
npm run build