diff --git a/devops/tsconfig/index.js b/devops/tsconfig/index.js index 62d8c9ddca..12eb80be95 100644 --- a/devops/tsconfig/index.js +++ b/devops/tsconfig/index.js @@ -18,6 +18,9 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js const tsConfigBase = { compilerOptions: { module: 'esnext', + moduleResolution: 'bundler', + moduleDetection: 'force', + verbatimModuleSyntax: true, target: 'es2022', lib: ['es2022', 'dom', 'dom.iterable'], outDir: './types', @@ -29,8 +32,6 @@ const tsConfigBase = { incremental: true, skipLibCheck: true, noImplicitOverride: true, - /* Bundler mode */ - moduleResolution: 'bundler', allowImportingTsExtensions: true, resolveJsonModule: true, isolatedModules: true, diff --git a/examples/sorter-with-nested-containers/sorter-item.ts b/examples/sorter-with-nested-containers/sorter-item.ts index 73ff83ca1f..206b88de78 100644 --- a/examples/sorter-with-nested-containers/sorter-item.ts +++ b/examples/sorter-with-nested-containers/sorter-item.ts @@ -1,7 +1,6 @@ import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -import { css, html, customElement, LitElement, state, repeat, property } from '@umbraco-cms/backoffice/external/lit'; +import { css, html, customElement, LitElement, property } from '@umbraco-cms/backoffice/external/lit'; import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api'; -import { UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter'; @customElement('example-sorter-item') export class ExampleSorterItem extends UmbElementMixin(LitElement) { diff --git a/examples/sorter-with-two-containers/sorter-group.ts b/examples/sorter-with-two-containers/sorter-group.ts index 090bd78335..f8cddb2a0f 100644 --- a/examples/sorter-with-two-containers/sorter-group.ts +++ b/examples/sorter-with-two-containers/sorter-group.ts @@ -1,10 +1,10 @@ +import type ExampleSorterItem from './sorter-item.js'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import { css, html, customElement, LitElement, repeat, property } from '@umbraco-cms/backoffice/external/lit'; import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api'; -import { UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter'; +import { UmbSorterController } from '@umbraco-cms/backoffice/sorter'; import './sorter-item.js'; -import ExampleSorterItem from './sorter-item.js'; export type ModelEntryType = { name: string; diff --git a/examples/sorter-with-two-containers/sorter-item.ts b/examples/sorter-with-two-containers/sorter-item.ts index 6d5e562215..3b71e868df 100644 --- a/examples/sorter-with-two-containers/sorter-item.ts +++ b/examples/sorter-with-two-containers/sorter-item.ts @@ -1,7 +1,6 @@ import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -import { css, html, customElement, LitElement, state, repeat, property } from '@umbraco-cms/backoffice/external/lit'; +import { css, html, customElement, LitElement, property } from '@umbraco-cms/backoffice/external/lit'; import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api'; -import { UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter'; @customElement('example-sorter-item') export class ExampleSorterItem extends UmbElementMixin(LitElement) { diff --git a/src/external/router-slot/config.ts b/src/external/router-slot/config.ts index 294d66666d..e587ba2c4b 100644 --- a/src/external/router-slot/config.ts +++ b/src/external/router-slot/config.ts @@ -1,4 +1,4 @@ -import { PathMatch } from './model.js'; +import type { PathMatch } from './model.js'; export const CATCH_ALL_WILDCARD: string = '**'; export const TRAVERSE_FLAG: string = '\\.\\.\\/'; diff --git a/src/external/router-slot/router-slot.ts b/src/external/router-slot/router-slot.ts index 14e6f7a1b5..06fddd335b 100644 --- a/src/external/router-slot/router-slot.ts +++ b/src/external/router-slot/router-slot.ts @@ -1,5 +1,5 @@ import { GLOBAL_ROUTER_EVENTS_TARGET, ROUTER_SLOT_TAG_NAME } from './config.js'; -import { +import type { Cancel, EventListenerSubscription, GlobalRouterEvent, diff --git a/src/external/router-slot/util/events.ts b/src/external/router-slot/util/events.ts index 5621a41c77..1a5d1816f6 100644 --- a/src/external/router-slot/util/events.ts +++ b/src/external/router-slot/util/events.ts @@ -1,5 +1,5 @@ -import { GLOBAL_ROUTER_EVENTS_TARGET } from '../config'; -import { EventListenerSubscription, GlobalRouterEvent, IRoute, IRoutingInfo } from '../model'; +import { GLOBAL_ROUTER_EVENTS_TARGET } from '../config.js'; +import type { EventListenerSubscription, GlobalRouterEvent, IRoute, IRoutingInfo } from '../model.js'; /** * Dispatches a did change route event. diff --git a/src/external/router-slot/util/history.ts b/src/external/router-slot/util/history.ts index 20ad3c8d2f..7ee34d74d0 100644 --- a/src/external/router-slot/util/history.ts +++ b/src/external/router-slot/util/history.ts @@ -1,6 +1,6 @@ -import { GLOBAL_ROUTER_EVENTS_TARGET, HISTORY_PATCH_NATIVE_KEY } from '../config'; -import { GlobalRouterEvent } from '../model'; -import { dispatchGlobalRouterEvent } from './events'; +import { GLOBAL_ROUTER_EVENTS_TARGET, HISTORY_PATCH_NATIVE_KEY } from '../config.js'; +import type { GlobalRouterEvent } from '../model.js'; +import { dispatchGlobalRouterEvent } from './events.js'; // Mapping a history functions to the events they are going to dispatch. export const historyPatches: [string, GlobalRouterEvent[]][] = [ diff --git a/src/external/router-slot/util/router.ts b/src/external/router-slot/util/router.ts index 5b084e4f71..0602181f10 100644 --- a/src/external/router-slot/util/router.ts +++ b/src/external/router-slot/util/router.ts @@ -1,5 +1,5 @@ -import { CATCH_ALL_WILDCARD, DEFAULT_PATH_MATCH, PARAM_IDENTIFIER, TRAVERSE_FLAG } from '../config'; -import { +import { CATCH_ALL_WILDCARD, DEFAULT_PATH_MATCH, PARAM_IDENTIFIER, TRAVERSE_FLAG } from '../config.js'; +import type { IComponentRoute, IRedirectRoute, IResolverRoute, @@ -12,8 +12,8 @@ import { PathFragment, RouterTree, IRoutingInfo, -} from '../model'; -import { constructPathWithBasePath, path as getPath, queryString, stripSlash } from './url'; +} from '../model.js'; +import { constructPathWithBasePath, path as getPath, queryString, stripSlash } from './url.js'; /** * Determines whether the path is active. diff --git a/src/external/router-slot/util/shadow.ts b/src/external/router-slot/util/shadow.ts index a0ead2f6a2..735e665cb7 100644 --- a/src/external/router-slot/util/shadow.ts +++ b/src/external/router-slot/util/shadow.ts @@ -1,5 +1,5 @@ -import { ROUTER_SLOT_TAG_NAME } from '../config'; -import { IRouterSlot } from '../model'; +import { ROUTER_SLOT_TAG_NAME } from '../config.js'; +import type { IRouterSlot } from '../model.js'; /** * Queries the parent router. diff --git a/src/external/router-slot/util/url.ts b/src/external/router-slot/util/url.ts index 8ca75dc55d..9ce3696cb7 100644 --- a/src/external/router-slot/util/url.ts +++ b/src/external/router-slot/util/url.ts @@ -1,4 +1,4 @@ -import { ISlashOptions, Params, Query } from '../model'; +import type { ISlashOptions, Query } from '../model.js'; const $anchor = document.createElement('a'); diff --git a/tsconfig.json b/tsconfig.json index 1d69cbe783..cce8eece25 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,9 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js { "compilerOptions": { "module": "esnext", + "moduleResolution": "bundler", + "moduleDetection": "force", + "verbatimModuleSyntax": true, "target": "es2022", "lib": ["es2022", "dom", "dom.iterable"], "outDir": "./types", @@ -21,7 +24,6 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js "incremental": true, "skipLibCheck": true, "noImplicitOverride": true, - "moduleResolution": "bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true,