Skip to content

Commit 11e02c6

Browse files
committed
build: remove renaming static dir to resources
1 parent 87562ee commit 11e02c6

File tree

5 files changed

+3
-28
lines changed

5 files changed

+3
-28
lines changed

config-overrides.js

-11
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ module.exports = {
1414
});
1515

1616
if (env === 'production') {
17-
oneOfRule.oneOf.splice(0, 0, {
18-
test: /\.svg$/,
19-
include: path.resolve(srcRoot, 'assets/illustrations'),
20-
loader: 'file-loader',
21-
options: {
22-
// default is 'static/media/...', but the embedded version static is served from 'resources/media/...',
23-
// and the 'resources' substring is handled by the publicPath below
24-
name: 'media/[name].[hash:8].[ext]',
25-
},
26-
});
27-
config.output.publicPath = 'resources/';
2817
config.output.path = path.resolve(__dirname, 'build/');
2918
}
3019

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"start": "react-app-rewired start",
4343
"dev": "DISABLE_ESLINT_PLUGIN=true TSC_COMPILE_ON_ERROR=true REACT_APP_BACKEND=http://localhost:8765 npm start",
4444
"build": "react-app-rewired build",
45-
"build:embedded": "rm -rf build && REACT_APP_BACKEND=http://localhost:8765 npm run build && ./prepare-build.sh",
45+
"//build:embedded": "echo 'PUBLIC_URL is a setting for create-react-app. Embedded version is built and hosted as is on ydb servers, with no way of knowing the final URL pattern. PUBLIC_URL=. keeps paths to all static relative, allowing servers to handle them as needed'",
46+
"build:embedded": "rm -rf build && PUBLIC_URL=. REACT_APP_BACKEND=http://localhost:8765 npm run build",
4647
"lint:styles": "stylelint 'src/**/*.scss'",
4748
"package": "rm -rf dist && copyfiles -u 1 'src/**/*' dist",
4849
"test": "react-app-rewired test",

prepare-build.sh

-15
This file was deleted.

public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
5+
<link rel="icon" href="%PUBLIC_URL%/static/favicon.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
File renamed without changes.

0 commit comments

Comments
 (0)