You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for similar issues before opening a new one.
Description
An error occurs when importing message files with filenames that contain hyphens (en-gb, zh-hant, etc).
In v11, a script for building message files was updated (#8091). The code below reveals that we directly use the filenames from msg/json/*.json to name the default export object.
Import message files in index.js (ex: en-gb). import * as enGb from 'blockly/msg/en-gb';
Stack trace
ERROR in ./node_modules/blockly/msg/en-gb.mjs 1:9
Module parse failed: Unexpected token (1:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> import en-gb from './en-gb.js';|export const {
| LOGIC_HUE,
@ ./src/index.js 8:0-42 16:18-22
Screenshots
No response
Browsers
No response
The text was updated successfully, but these errors were encountered:
Check for duplicates
Description
An error occurs when importing message files with filenames that contain hyphens (en-gb, zh-hant, etc).
In v11, a script for building message files was updated (#8091). The code below reveals that we directly use the filenames from
msg/json/*.json
to name the default export object.blockly/scripts/gulpfiles/build_tasks.js
Lines 658 to 688 in 9519333
However, hyphens are not legal in javascript names, which seems to be the root cause of the issue.
Reproduction steps
import * as enGb from 'blockly/msg/en-gb';
Stack trace
Screenshots
No response
Browsers
No response
The text was updated successfully, but these errors were encountered: