Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stenciljs/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.28.1
Choose a base ref
...
head repository: stenciljs/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.28.2
Choose a head ref
  • 2 commits
  • 5 files changed
  • 5 contributors

Commits on Mar 13, 2025

  1. build: improve nodeResolve config (#6203)

    * fix(build): expand nodeResolve export conditions to include `require`
    
    * chore: nodeResolve - allow user config to take precedence over default. Update types
    
    * chore: tweak
    
    * chore: untweak :D
    
    ---------
    
    Co-authored-by: John Jenkins <john.jenkins@nanoporetech.com>
    johnjenkins and John Jenkins authored Mar 13, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    34d2284 View commit details
  2. Release v4.28.2 (#6204)

    * v4.28.2
    
    * update changelog
    
    ---------
    
    Co-authored-by: christian-bromann <731337+christian-bromann@users.noreply.github.com>
    Co-authored-by: Christian Bromann <git@bromann.dev>
    3 people authored Mar 13, 2025
    Copy the full SHA
    37ac3fc View commit details
Showing with 23 additions and 11 deletions.
  1. +7 −0 CHANGELOG.md
  2. +2 −2 package-lock.json
  3. +1 −1 package.json
  4. +3 −2 src/compiler/bundle/bundle-output.ts
  5. +10 −6 src/declarations/stencil-public-compiler.ts
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 🎤 [4.28.2](https://github.com/stenciljs/core/compare/v4.28.1...v4.28.2) (2025-03-13)

### Bug Fixes

* **compiler:** improve nodeResolve config ([#6203](https://github.com/stenciljs/core/issues/6203)) ([34d2284](https://github.com/stenciljs/core/commit/34d2284f9a6118da3f0a11e34c6c2d30e969fa74)),


## 🐵 [4.28.1](https://github.com/stenciljs/core/compare/v4.28.0...v4.28.1) (2025-03-13)


4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stencil/core",
"version": "4.28.1",
"version": "4.28.2",
"license": "MIT",
"main": "./internal/stencil-core/index.cjs",
"module": "./internal/stencil-core/index.js",
5 changes: 3 additions & 2 deletions src/compiler/bundle/bundle-output.ts
Original file line number Diff line number Diff line change
@@ -59,10 +59,11 @@ export const getRollupOptions = (
): RollupOptions => {
const nodeResolvePlugin = rollupNodeResolvePlugin({
mainFields: ['collection:main', 'jsnext:main', 'es2017', 'es2015', 'module', 'main'],
browser: true,
browser: bundleOpts.platform !== 'hydrate',
rootDir: config.rootDir,
...(config.nodeResolve as any),
exportConditions: ['default', 'module', 'import', 'require'],
extensions: ['.tsx', '.ts', '.mts', '.cts', '.js', '.mjs', '.cjs', '.json', '.d.ts', '.d.mts', '.d.cts'],
...config.nodeResolve,
});

// @ts-expect-error - this is required now.
16 changes: 10 additions & 6 deletions src/declarations/stencil-public-compiler.ts
Original file line number Diff line number Diff line change
@@ -1772,15 +1772,19 @@ export interface BundlingConfig {
}

export interface NodeResolveConfig {
module?: boolean;
jsnext?: boolean;
main?: boolean;
exportConditions?: string[];
browser?: boolean;
extensions?: string[];
preferBuiltins?: boolean;
moduleDirectories?: string[];
modulePaths?: string[];
dedupe?: string[] | ((importee: string) => boolean);
extensions?: readonly string[];
jail?: string;
only?: Array<string | RegExp>;
mainFields?: readonly string[];
modulesOnly?: boolean;
preferBuiltins?: boolean | ((module: string) => boolean);
resolveOnly?: ReadonlyArray<string | RegExp> | null | ((module: string) => boolean);
rootDir?: string;
allowExportsFolderMapping?: boolean;

// TODO(STENCIL-1107): Remove this field [BREAKING_CHANGE]
/**