Skip to content

Commit 99add67

Browse files
authored
fix(config): revert esmLoaderPath change (#1561)
1 parent 102d09b commit 99add67

4 files changed

Lines changed: 3 additions & 13 deletions

File tree

BREAKING_CHANGES.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,6 @@ import { JSX } from '@stencil/core';
137137
export type StencilIntrinsicElement = JSX.IntrinsicElement;
138138
```
139139

140-
### Moved loader entrypoint
141-
142-
Now the `loader` entrypoint, useful to register the web components in webpack projects, has been moved outside the `dist` folder.
143-
By default `loader` will be a sibling of `dist` now:
144-
145-
```diff
146-
- import { defineCustomElements } from 'my-collection/dist/loader';
147-
+ import { defineCustomElements } from 'my-collection/loader';
148-
```
149-
150140
### Removed: @Listen('event.KEY’)
151141

152142
It's no longer possible to use the `event.KEY` syntax in the `@Listen` decorator in order to only listen for specific key strokes.

src/compiler/config/validate-outputs-dist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function validateOutputTargetDist(config: d.Config) {
4343
}
4444

4545
if (!path.isAbsolute(outputTarget.esmLoaderPath)) {
46-
outputTarget.esmLoaderPath = normalizePath(path.resolve(config.rootDir, outputTarget.esmLoaderPath));
46+
outputTarget.esmLoaderPath = normalizePath(path.resolve(outputTarget.dir, outputTarget.esmLoaderPath));
4747
}
4848

4949
if (!outputTarget.typesDir) {

src/compiler/output-targets/test/output-targets-dist.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('outputTarget, dist', () => {
6464
path.join(root, 'User', 'testing', 'dist', 'esm', 'legacy', 'loader.mjs'),
6565
path.join(root, 'User', 'testing', 'dist', 'esm', 'polyfills', 'index.js'),
6666

67-
path.join(root, 'User', 'testing', 'loader'),
67+
path.join(root, 'User', 'testing', 'dist', 'loader'),
6868

6969
path.join(root, 'User', 'testing', 'dist', 'types'),
7070

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { defineCustomElements } from '../../loader';
1+
import { defineCustomElements } from '../../test-dist/loader';
22

33
defineCustomElements(window);

0 commit comments

Comments
 (0)