This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const md5File = require('md5-file'); | |
const path = require('path'); | |
// CSS styles will be imported on load and that complicates matters... ignore those bad boys! | |
const ignoreStyles = require('ignore-styles'); | |
const register = ignoreStyles.default; | |
// We also want to ignore all image requests | |
// When running locally these will load from a standard import | |
// When running on the server, we want to load via their hashed version in the build folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ignore those pesky styles | |
require('ignore-styles'); | |
// Set up babel to do its thing... env for the latest toys, react-app for CRA | |
require('babel-register')({ | |
ignore: /\/(build|node_modules)\//, | |
presets: ['env', 'react-app'] | |
}); | |
// Now that the nonsense is over... load up the server entry point |