Closed richardo2016 closed 2 years ago
@guybedford Hi, there're some points we need to check:
./lexer.js
with ./src/lexer.c
?exports[0]
equals to '"~123"'
(string with double-quotes "
), or to '~123'
(string only).export { "~123" } from './mod0.js';
On the other hand, maybe you need to clone branch on which I take PR with, to check if all tests passed.
Maybe after this PR we could use github actions to run tests on PR or push of main
branch. It's not hard, but require some nitty-gritty works. If es-module-lexer
need it, I could make another PR to add CI.
This PR is trying to support string-literal imports/exports for esmodule.
See proposals detail: https://github.com/bmeck/proposal-arbitrary-module-namespace-identifiers
Please @guybedford review changes of this PR to help make sure it compliance with convention.
BTW, I have tried to do some code synchronization from guybedford/cjs-module-lexer as mentioned here, but I found it's HARD to synchronize due to code context changes mentioned here. So I just implement the feature as it should be in this repository.