mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-01-10 05:56:56 -06:00
43 lines
599 B
TypeScript
43 lines
599 B
TypeScript
require('dotenv').config();
|
|
|
|
require('ignore-styles');
|
|
|
|
require('@babel/register')({
|
|
'presets': [
|
|
['@babel/preset-env', {'targets': {'node': 'current'}}],
|
|
'@babel/preset-react',
|
|
'@babel/preset-typescript',
|
|
]
|
|
});
|
|
|
|
require('asset-require-hook')({
|
|
extensions: [
|
|
// images
|
|
'jpg',
|
|
'png',
|
|
'svg',
|
|
'gif',
|
|
'ico',
|
|
// videos
|
|
'mp4',
|
|
'avi',
|
|
// files
|
|
'pdf',
|
|
],
|
|
name: '/assets/media/[name].[ext]',
|
|
});
|
|
|
|
require('asset-require-hook')({
|
|
extensions: [
|
|
// typography
|
|
'ttf',
|
|
'otf',
|
|
'eot',
|
|
'woff',
|
|
'woff2',
|
|
],
|
|
name: '/assets/fonts/[name].[ext]',
|
|
});
|
|
|
|
require('./server');
|