create-react-ssr/client/src/server/index.js

37 lines
500 B
JavaScript
Raw Normal View History

require('dotenv').config();
require('ignore-styles');
//require('webpack-node-externals')();
require('@babel/register')({
2022-04-19 18:21:16 -06:00
'presets': [
'@babel/preset-env',
'@babel/preset-react',
"@babel/preset-typescript",
// '@babel/preset-flow',
2022-04-19 18:21:16 -06:00
]
});
require('asset-require-hook')({
2022-04-19 18:21:16 -06:00
extensions: [
// images
'jpg',
'png',
'svg',
'gif',
// videos
'mp4',
'avi',
// typography
'ttf',
'otf',
'eot',
// files
'pdf'
],
name: '/assets/[hash].[ext]',
});
2022-04-19 18:21:16 -06:00
require('./server');