Commit dc77cf01 authored by Zach Osman's avatar Zach Osman

Absolute imports ftw

parent 58b6bf13
Pipeline #3243 passed with stage
in 1 minute and 4 seconds
import React from 'react';
import { NavBar } from 'Components';
export default class PageTemplate extends React.Component {
render() {
return (
<div style={[styles.container, this.props.style]}>
<NavBar />
<div>{this.props.children}</div>
</div>
);
}
}
import PageTemplate from './PageTemplate';
export { PageTemplate };
import { PageTemplate } from './Templates';
import { HomePage, AboutPage } from './Pages';
import { NavBar } from './Organisms';
export { HomePage, AboutPage, NavBar };
export {
//Tempaltes
PageTemplate,
//Pages
HomePage,
AboutPage,
//Organisms
NavBar,
};
......@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
import { HashRouter, Route, Link } from 'react-router-dom';
import { Button } from 'reactstrap';
import { HomePage, AboutPage, NavBar } from './Components';
import { HomePage, AboutPage, NavBar } from 'Components';
const Dhaynes = () => <p>dhaynes</p>;
......
const path = require('path');
module.exports = {
module: {
rules: [
......@@ -10,5 +12,8 @@ module.exports = {
},
resolve: {
extensions: ['*', '.js', '.jsx'],
alias: {
Components: path.resolve(__dirname, './go/go_ahead/src/Components'),
},
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment