From e4651c8d1bc1c416de553428bcfba137ca35ef91 Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 7 Feb 2019 00:37:13 -0500 Subject: use a minimal webpack-based build env --- config/paths.js | 89 --------------------------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 config/paths.js (limited to 'config/paths.js') diff --git a/config/paths.js b/config/paths.js deleted file mode 100644 index c24b4dd..0000000 --- a/config/paths.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -const path = require('path'); -const fs = require('fs'); -const url = require('url'); - -// Make sure any symlinks in the project folder are resolved: -// https://github.com/facebook/create-react-app/issues/637 -const appDirectory = fs.realpathSync(process.cwd()); -const resolveApp = relativePath => path.resolve(appDirectory, relativePath); - -const envPublicUrl = process.env.PUBLIC_URL; - -function ensureSlash(inputPath, needsSlash) { - const hasSlash = inputPath.endsWith('/'); - if (hasSlash && !needsSlash) { - return inputPath.substr(0, inputPath.length - 1); - } else if (!hasSlash && needsSlash) { - return `${inputPath}/`; - } else { - return inputPath; - } -} - -const getPublicUrl = appPackageJson => - envPublicUrl || require(appPackageJson).homepage; - -// We use `PUBLIC_URL` environment variable or "homepage" field to infer -// "public path" at which the app is served. -// Webpack needs to know it to put the right