forked from external-repos/squoosh
Replace deprecated terser plugin (#1423)
* Replace deprecated terser plugin * Update Node version * Fix build on windows * Use path resolve instead of posix --------- Co-authored-by: robo-mop <realaryanpingle@gmail.com>
This commit is contained in:
@@ -10,12 +10,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { posix as pathUtils, isAbsolute } from 'path';
|
||||
import { posix, isAbsolute, resolve } from 'path';
|
||||
|
||||
export default function resolveDirs(paths) {
|
||||
const pathBaseDir = paths.map((path) => [
|
||||
pathUtils.basename(path),
|
||||
pathUtils.dirname(path),
|
||||
posix.basename(path),
|
||||
posix.dirname(path),
|
||||
]);
|
||||
|
||||
return {
|
||||
@@ -31,7 +31,7 @@ export default function resolveDirs(paths) {
|
||||
throw new Error(`Couldn't find ${'./' + id}`);
|
||||
}
|
||||
if (isAbsolute(resolveResult.id)) return resolveResult.id;
|
||||
return pathUtils.resolve(resolveResult.id);
|
||||
return resolve(resolveResult.id);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user