Skip to content

Conversation

@2heal1
Copy link
Member

@2heal1 2heal1 commented Jan 16, 2024

Description

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

attrs['type'] === 'cjs' &&
/^(\/|[A-Za-z]:\\|\\\\|\.\.?(\/|$))/.test(url)
) {
const requireClient = eval('require');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can new Function() used here?

'commonjs2',
'commonjs-module',
'commonjs-static',
'node-commonjs',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fufure we should do "internal" as well?

@jacob-ebey this would let you reference internal modules like "internal ./src/something" and get the module like webpack_require, as long as its bundled in somehow

@ScriptedAlchemy ScriptedAlchemy changed the title WIP: feat: support cjs feat: support cjs Jan 17, 2024
@ScriptedAlchemy ScriptedAlchemy merged commit 6e0cef8 into feat/use-runtime-script-load Jan 17, 2024
@ScriptedAlchemy ScriptedAlchemy deleted the feat/support-cjs branch January 17, 2024 06:15
ScriptedAlchemy added a commit that referenced this pull request Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants