mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-16 12:54:38 +00:00
strip leading slash from basepath - fixes #495
This commit is contained in:
@@ -38,6 +38,8 @@ async function _export({
|
|||||||
oninfo = noop,
|
oninfo = noop,
|
||||||
onfile = noop
|
onfile = noop
|
||||||
}: Opts = {}) {
|
}: Opts = {}) {
|
||||||
|
basepath = basepath.replace(/^\//, '')
|
||||||
|
|
||||||
cwd = path.resolve(cwd);
|
cwd = path.resolve(cwd);
|
||||||
static_files = path.resolve(cwd, static_files);
|
static_files = path.resolve(cwd, static_files);
|
||||||
build_dir = path.resolve(cwd, build_dir);
|
build_dir = path.resolve(cwd, build_dir);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ describe('with-basepath', function() {
|
|||||||
|
|
||||||
await api.export({
|
await api.export({
|
||||||
cwd: __dirname,
|
cwd: __dirname,
|
||||||
basepath: 'custom-basepath'
|
basepath: '/custom-basepath'
|
||||||
});
|
});
|
||||||
|
|
||||||
runner = new AppRunner(__dirname, '__sapper__/build/server/server.js');
|
runner = new AppRunner(__dirname, '__sapper__/build/server/server.js');
|
||||||
|
|||||||
Reference in New Issue
Block a user