Skip to content

Commit e7053dd

Browse files
authored
Use absolute path resolution for empty.js (#7568)
1 parent d382c59 commit e7053dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/dev/optimize-locales-plugin/LocalesPlugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* governing permissions and limitations under the License.
1111
*/
1212
const {createUnplugin} = require('unplugin');
13+
const path = require('path');
1314

1415
module.exports = createUnplugin(({locales}) => {
1516
locales = locales.map(l => new Intl.Locale(l));
@@ -24,7 +25,7 @@ module.exports = createUnplugin(({locales}) => {
2425
if (match) {
2526
let locale = new Intl.Locale(match[0]);
2627
if (!locales.some(l => localeMatches(locale, l))) {
27-
return __dirname + '/empty.js';
28+
return path.join(__dirname, 'empty.js');
2829
}
2930
}
3031

0 commit comments

Comments
 (0)