Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
2d1f64d2
Unverified
Commit
2d1f64d2
authored
May 02, 2020
by
Fabian Mastenbroek
Committed by
GitHub
May 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support distDir with trailing slash for static files (#10592)
parent
ed66d14d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
next.config.js
test/integration/trailing-slash-dist/next.config.js
+3
-0
index.js
test/integration/trailing-slash-dist/pages/index.js
+1
-0
index.test.js
test/integration/trailing-slash-dist/test/index.test.js
+33
-0
No files found.
test/integration/trailing-slash-dist/next.config.js
0 → 100644
View file @
2d1f64d2
module
.
exports
=
{
distDir
:
'.next/'
,
}
test/integration/trailing-slash-dist/pages/index.js
0 → 100644
View file @
2d1f64d2
export
default
()
=>
'hello from index'
test/integration/trailing-slash-dist/test/index.test.js
0 → 100644
View file @
2d1f64d2
/* eslint-env jest */
/* global jasmine */
import
{
join
}
from
'path'
import
{
killApp
,
findPort
,
launchApp
,
fetchViaHTTP
}
from
'next-test-utils'
jasmine
.
DEFAULT_TIMEOUT_INTERVAL
=
1000
*
60
*
2
const
appDir
=
join
(
__dirname
,
'../'
)
let
appPort
let
app
const
runTest
=
(
mode
=
'server'
)
=>
{
it
(
'supports trailing slash'
,
async
()
=>
{
const
res
=
await
fetchViaHTTP
(
appPort
,
'/_next/static/development/pages/index.js'
)
expect
(
res
.
status
).
toBe
(
200
)
})
}
describe
(
'Trailing slash in distDir'
,
()
=>
{
describe
(
'dev mode'
,
()
=>
{
beforeAll
(
async
()
=>
{
appPort
=
await
findPort
()
app
=
await
launchApp
(
appDir
,
appPort
)
})
afterAll
(()
=>
killApp
(
app
))
runTest
(
'dev'
)
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment