Hello,
I got this error when publishing my ESModule project: Cannot read properties of undefined (reading '1')
I reproduce the issue with the following files:
test.js
import './another.js'
console.log('This is a test')
another.js
console.log('This is another module')
wragnler.toml
name = 'test'
type = 'javascript'
account_id = '<ACCOUNT_ID>'
zone_id = '<ZONE_ID>'
compatibility_date = '2021-11-10'
[build.upload]
format = 'modules'
main = './test.js'
And then run npx wrangler@beta publish
The issue does not exist if another.js is not imported. I am not sure this is a bug or it is because v2 is still in beta and ESModule is not yet supported
Thank you.
Hello,
I got this error when publishing my ESModule project:
Cannot read properties of undefined (reading '1')I reproduce the issue with the following files:
test.js
another.js
wragnler.toml
And then run
npx wrangler@beta publishThe issue does not exist if
another.jsis not imported. I am not sure this is a bug or it is because v2 is still in beta and ESModule is not yet supportedThank you.