From 9a151080e1d32c389b2941147f05d3e9348755c8 Mon Sep 17 00:00:00 2001 From: JubbeArt Date: Sat, 28 Jul 2018 16:58:45 +0200 Subject: [PATCH] Replaced absolute import paths with relative paths --- src/api/pushshift/index.js | 2 +- src/pages/common/Post.js | 2 +- src/pages/thread/CommentSection.js | 2 +- src/pages/thread/index.js | 6 +++--- src/state/index.js | 2 +- webpack.config.js | 6 ------ 6 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/api/pushshift/index.js b/src/api/pushshift/index.js index 67bc1f8..61e7226 100644 --- a/src/api/pushshift/index.js +++ b/src/api/pushshift/index.js @@ -1,4 +1,4 @@ -import { toBase10, toBase36 } from 'utils' +import { toBase10, toBase36 } from '../../utils' const baseURL = 'https://elastic.pushshift.io' const postURL = `${baseURL}/rs/submissions/_search?source=` diff --git a/src/pages/common/Post.js b/src/pages/common/Post.js index 63aca7f..d8e2a26 100644 --- a/src/pages/common/Post.js +++ b/src/pages/common/Post.js @@ -1,6 +1,6 @@ import React from 'react' import { Link } from 'react-router-dom' -import { prettyScore, prettyDate, parse, redditThumbnails, isDeleted } from 'utils' +import { prettyScore, prettyDate, parse, redditThumbnails, isDeleted } from '../../utils' export default (props) => { if (!props.title) { diff --git a/src/pages/thread/CommentSection.js b/src/pages/thread/CommentSection.js index f557c0e..65840fc 100644 --- a/src/pages/thread/CommentSection.js +++ b/src/pages/thread/CommentSection.js @@ -6,7 +6,7 @@ import {connect, sort, filter} from '../../state' import { topSort, bottomSort, newSort, oldSort, showRemovedAndDeleted, showRemoved, showDeleted -} from 'utils' +} from '../../utils' const arrayToLookup = (commentList, removed, deleted) => { const lookup = {} diff --git a/src/pages/thread/index.js b/src/pages/thread/index.js index 1e9ec77..d4415e5 100644 --- a/src/pages/thread/index.js +++ b/src/pages/thread/index.js @@ -4,12 +4,12 @@ import CommentSection from './CommentSection' import { getPost, getComments as getRedditComments -} from 'api/reddit' +} from '../../api/reddit' import { getPost as getRemovedPost, getComments as getPushshiftComments -} from 'api/pushshift' -import { isDeleted, isRemoved } from 'utils' +} from '../../api/pushshift' +import { isDeleted, isRemoved } from '../../utils' export default class Thread extends React.Component { constructor (props) { diff --git a/src/state/index.js b/src/state/index.js index 6d39d9e..1173b4e 100644 --- a/src/state/index.js +++ b/src/state/index.js @@ -1,6 +1,6 @@ import React from 'react' import { Subscribe, Container } from 'unstated' -import { get, put } from 'utils' +import { get, put } from '../utils' // Sort types for comments export const sort = { diff --git a/webpack.config.js b/webpack.config.js index a6ff7ba..021be60 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -11,12 +11,6 @@ module.exports = { historyApiFallback: true }, devtool: 'cheap-module-eval-source-map', - resolve: { - modules: [ - path.resolve(__dirname, 'src'), - path.resolve(__dirname, 'node_modules') - ] - }, module: { rules: [ {