Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions packages/cra-template/template/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
/coverage

# production
# /build
# Changed from /build to /dist because this is default for
# Netlify when deploying an app using `@upleveled/react-scripts`
# Ref: https://github.com/upleveled/create-react-app/commit/ab165a178994751e837d2835b2a4dbcc48f6f709#
/dist
/build

# misc
.DS_Store
Expand Down
3 changes: 3 additions & 0 deletions packages/cra-template/template/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
publish = "build"
command = "pnpm run build"
5 changes: 1 addition & 4 deletions packages/react-scripts/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ const publicUrlOrPath = getPublicUrlOrPath(
process.env.PUBLIC_URL,
);

const buildPath =
process.env.BUILD_PATH ||
// Default for Netlify when deploying an app using `@upleveled/react-scripts`
'dist';
const buildPath = process.env.BUILD_PATH || 'build';

const moduleFileExtensions = [
'web.mjs',
Expand Down