Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing ES modules in tests #3

Open
RossHathaway opened this issue Jun 8, 2020 · 0 comments
Open

Importing ES modules in tests #3

RossHathaway opened this issue Jun 8, 2020 · 0 comments

Comments

@RossHathaway
Copy link

Hello. I am not sure why the require statement in test/test.js (const rollupStarterPlugin = require('..');
) works but other require statements don't.

Steps to reproduce issue:
clone repo
npm i
npm test (no problems)
create new file src/test-import.js containing export default 5
add to test/test.js const testImport = require('../src/test-import')
run npm test, get error "SyntaxError: Unexpected token 'export'" referring to export default 5 in src/test-import.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant