Going to one template for all pages

This commit is contained in:
Jeff Avallone 2018-02-10 16:39:38 -05:00
parent 8eb4b450ca
commit f8aaeba7a9
6 changed files with 6 additions and 16 deletions

1
src/pages/404.js Normal file
View File

@ -0,0 +1 @@
import '../style.css';

View File

@ -1 +0,0 @@
import '../../style.css';

View File

@ -1,10 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Regexper - 404</title>
</head>
<body>
<h1>404</h1>
</body>
</html>

View File

@ -1,9 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from '../../componets/App';
import App from '../componets/App';
import '../../style.css';
import '../../service-worker';
import '../style.css';
import '../service-worker';
ReactDOM.render(<App/>, document.getElementById('root'));

View File

@ -10,8 +10,8 @@ const pkg = require('./package.json');
const pages = fs.readdirSync(path.resolve(__dirname, 'src/pages'));
const pagePlugins = pages.map(name => new HtmlPlugin({
template: `./src/pages/${ name }/template.html`,
filename: `${ name }.html`,
template: './src/template.html',
filename: name.replace(/\.js$/, '.html'),
chunks: ['common', name],
minify: {
removeComments: true,