Skip to content

Commit 6074a29

Browse files
alicewriteswrongsrwaskiewicz
authored andcommitted
remove assetsDir backwards compatibility (#3341)
the `assetsDir` option for the `@Component` decorator was deprecated some time ago in favor of the `assetsDirs` option, but we have retained backwards-compatibility with the old option nonetheless. this commit removes that backwards compatibility. STENCIL-410: Remove Backwards Compatibility for assetDir Field on @component BREAKING CHANGE: setting `assetsDir` on a component will no longer work. Users should migrate to `assetsDirs` instead.
1 parent cb1f5fc commit 6074a29

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/compiler/transformers/decorators-to-static/component-decorator.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { augmentDiagnosticWithNode, buildError, buildWarn, isString, validateComponentTag } from '@utils';
1+
import { augmentDiagnosticWithNode, buildError, validateComponentTag } from '@utils';
22
import ts from 'typescript';
33

44
import type * as d from '../../../declarations';
@@ -41,13 +41,6 @@ export const componentDecoratorToStatic = (
4141

4242
const assetsDirs = componentOptions.assetsDirs || [];
4343

44-
if (isString((componentOptions as any).assetsDir)) {
45-
assetsDirs.push((componentOptions as any).assetsDir);
46-
const warn = buildWarn(diagnostics);
47-
warn.messageText = `@Component option "assetsDir" should be renamed to "assetsDirs" and the value should be an array of strings.`;
48-
augmentDiagnosticWithNode(warn, componentDecorator);
49-
}
50-
5144
if (assetsDirs.length > 0) {
5245
newMembers.push(createStaticGetter('assetsDirs', convertValueToLiteral(assetsDirs)));
5346
}

0 commit comments

Comments
 (0)