Values as constants in ES modules in JavaScript

Imported values behave like constants. Let's look at an example. Let's export a string:

src/test.jsexport default 'aaa';

And do an import:

src/index.jsimport str from './test.js';

Let's try to change the string:

src/index.jsstr = 'bbb'; // an error