From 6dbced389ee692fd55e00f36520b686270b1cdbc Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Fri, 17 Mar 2017 16:24:59 -0700 Subject: [PATCH] Add src/ to webpack's resolve so we can avoid nasty relative imports. See http://moduscreate.com/es6-es2015-import-no-relative-path-webpack/ and https://github.com/facebookincubator/create-react-app/pull/476. --- tnoodle-ui/package.json | 8 ++++---- tnoodle-ui/src/App.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tnoodle-ui/package.json b/tnoodle-ui/package.json index 00b1f3813..632b0d682 100644 --- a/tnoodle-ui/package.json +++ b/tnoodle-ui/package.json @@ -10,9 +10,9 @@ "react-scripts": "0.9.5" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" + "start": "NODE_PATH=src react-scripts start", + "build": "NODE_PATH=src react-scripts build", + "test": "NODE_PATH=src react-scripts test --env=jsdom", + "eject": "NODE_PATH=src react-scripts eject" } } diff --git a/tnoodle-ui/src/App.js b/tnoodle-ui/src/App.js index d7d52a7f3..7c749cd29 100644 --- a/tnoodle-ui/src/App.js +++ b/tnoodle-ui/src/App.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import logo from './logo.svg'; -import './App.css'; +import logo from 'logo.svg'; +import 'App.css'; class App extends Component { render() {