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

Import and require not work #1

Open
georgezouq opened this issue Aug 15, 2022 · 0 comments
Open

Import and require not work #1

georgezouq opened this issue Aug 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@georgezouq
Copy link

Import this package into my project (rollup) in this way:

import { generate } from '@arco-design/color';

Error: SyntaxError: Cannot use import statement outside a module

And I see in arco-design project palette.js, it uses require to import package

const { generate } = require('@arco-design/color');

And stall, it does not work for me

Error: Cannot find module '@arco-design/color'

I am not sure if this is because commonjs project is import into esnext project.
Should this package publish in the build version instance source code?

@PengJiyuan PengJiyuan added the enhancement New feature or request label Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants