Going to one template for all pages
This commit is contained in:
parent
8eb4b450ca
commit
f8aaeba7a9
1
src/pages/404.js
Normal file
1
src/pages/404.js
Normal file
@ -0,0 +1 @@
|
||||
import '../style.css';
|
@ -1 +0,0 @@
|
||||
import '../../style.css';
|
@ -1,10 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Regexper - 404</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>404</h1>
|
||||
</body>
|
||||
</html>
|
@ -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'));
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user