Skip to content

Commit

Permalink
fix: postpackage script
Browse files Browse the repository at this point in the history
  • Loading branch information
6eDesign committed Sep 17, 2021
1 parent d04fd68 commit 0e5b953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/postpackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const transformFolder = async ({ folders, files, depth }) => {
files.map(async (f) => {
const filepath = path.join(CWD, f);
const contents = await fs.readFile(filepath, 'utf-8');
const base = depth ? [...Array(depth + 1).fill('..')].join('/') : './';
const base = depth ? [...Array(depth).fill('..')].join('/') : './';
const updated = contents
.replace(/from '\$lib(.*)'/g, `from '${base}$1'`)
.replace(/src\/lib\//g, '');
Expand Down

0 comments on commit 0e5b953

Please sign in to comment.