Skip to content

Commit

Permalink
Use absolute path resolution for empty.js (#7568)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohansFavour authored Jan 8, 2025
1 parent d382c59 commit e7053dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/dev/optimize-locales-plugin/LocalesPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* governing permissions and limitations under the License.
*/
const {createUnplugin} = require('unplugin');
const path = require('path');

module.exports = createUnplugin(({locales}) => {
locales = locales.map(l => new Intl.Locale(l));
Expand All @@ -24,7 +25,7 @@ module.exports = createUnplugin(({locales}) => {
if (match) {
let locale = new Intl.Locale(match[0]);
if (!locales.some(l => localeMatches(locale, l))) {
return __dirname + '/empty.js';
return path.join(__dirname, 'empty.js');
}
}

Expand Down

1 comment on commit e7053dd

@rspbot
Copy link

@rspbot rspbot commented on e7053dd Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.