[Bug] Can not import any locale file from grapesjs/locale/
Question
Hi I run into an error when I'm trying to import any locale file from 'grapejs/locale' by using es6 import
I followed by the documentation:
https://grapesjs.com/docs/modules/I18n.html#configuration
but I always get this:

I can import it only in next way

Could you explain why I can't import it directly from grapesjs/locale/.
grapejs was installed by npm install
grapejs is latest version (0.16.3)
Answers (3)
With the change provided by PR #6459 it is now possible to do the following:
<script type="importmap">
{
"imports": {
"grapesjs": "https://unpkg.com/grapesjs/dist/grapes.mjs",
"grapesjs/locale/en": "https://unpkg.com/grapesjs/locale/en.mjs",
"grapesjs/locale/pt": "https://unpkg.com/grapesjs/locale/pt.mjs",
}
}
</script>
Make sure you also load the styles correctly:
<link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
Should be fixed in https://github.com/artf/grapesjs/releases/tag/v0.16.12
It still don't works, only works from "src/i18n/locale/...." Using v0.20.3


Related Questions and Answers
Continue research with similar issue discussions.
Issue #4385
BUG: index.d.ts says that run commands should return void but docs say their return value may be used
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Any Reproducible demo link https://grapesj...
Issue #1894
[BUG] Custom Trait documentation example doesn't work
Specifically this: https://grapesjs.com/docs/modules/Traits.html#define-new-trait-type First of all, the keyUp event references onChange wh...
Issue #1812
[Bug]: 404 when trying to add background image (reproducible in demo)
Visit https://grapesjs.com/demo.html in Chrome IncognitoClick the "Header" elementClick Decorations > BackgroundDelete Layer 2Click Layer 1...
Issue #2478
Error when trying to move cell from row
If try move cell from table on body then appears error Also error appears on grapesjs demo https://grapesjs.com/demo-newsletter-editor.html
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.