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

Custom Webpack config not supported with ES Modules #110

Open
MichaelGoberling opened this issue Nov 4, 2022 · 2 comments
Open

Custom Webpack config not supported with ES Modules #110

MichaelGoberling opened this issue Nov 4, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@MichaelGoberling
Copy link
Contributor

Expected Behaviour

  • Custom Webpack configuration can be provided for a project using ES Modules.

Actual Behaviour

➜  sequence_test git:(main) ✗ aio app run --local
ℹ checking if java is installed...
ℹ checking if docker is installed...
ℹ checking if docker is running...
ℹ starting local OpenWhisk stack...
ℹ writing credentials to tmp wskdebug config '/Users/mgoberling/repos/adobe/my-utils/utils/sequence_test/dist/application/.env.local'
ℹ building actions..
 ›   Error: require() of ES Module /Users/mgoberling/repos/adobe/my-utils/utils/sequence_test/actions/first/webpack-config.js from 
 ›   /usr/local/lib/node_modules/@adobe/aio-cli/node_modules/@adobe/aio-lib-runtime/src/build-actions.js not supported.
 ›   Instead change the require of webpack-config.js in /usr/local/lib/node_modules/@adobe/aio-cli/node_modules/@adobe/aio-lib-runtime/src/build-actions.js to a dynamic 
 ›   import() which is available in all CommonJS modules.

Steps to Reproduce

  • aio app init with action
  • Add webpack-configuration.js to your action folder
  • Add "type": "module" to project package.json
  • Run aio app run --local
  • See error above

Additional notes

Due to import when building actions here

@MichaelGoberling MichaelGoberling added the bug Something isn't working label Nov 4, 2022
@MichaelGoberling MichaelGoberling self-assigned this Nov 4, 2022
@aiojbot
Copy link
Collaborator

aiojbot commented Dec 2, 2022

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-1896

@MichaelGoberling MichaelGoberling removed their assignment Jan 13, 2023
@MichaelGoberling MichaelGoberling added enhancement New feature or request and removed bug Something isn't working labels Jan 13, 2023
@aiojbot
Copy link
Collaborator

aiojbot commented Jan 18, 2023

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-1961

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