Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
refactor: use absolute imports to make imports predictable (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric authored Sep 30, 2018
1 parent 2341c0b commit d031a7c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NODE_PATH=./
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import './providers/react';
import './providers/service-worker';
import 'src/providers/react';
import 'src/providers/service-worker';
2 changes: 1 addition & 1 deletion src/pages/app/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import logo from '../../assets/logo.svg';
import logo from 'src/assets/logo.svg';
import './App.css';

class App extends Component {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/react.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { render } from 'react-dom';

import App from '../pages/app';
import App from 'src/pages/app';

render(<App />, document.getElementById('root'));
2 changes: 1 addition & 1 deletion src/providers/service-worker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as serviceWorker from '../sw';
import * as serviceWorker from 'src/sw';

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
Expand Down

0 comments on commit d031a7c

Please sign in to comment.