Skip to content

Commit

Permalink
Merge pull request #350 from AliMD/feat/import
Browse files Browse the repository at this point in the history
fix: Import error in webpack
  • Loading branch information
alimd authored Oct 31, 2022
2 parents 8ca3284 + 7222053 commit 4e91831
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 21 deletions.
4 changes: 2 additions & 2 deletions packages/core/element/src/element.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {alwatrRegisteredList, createLogger} from '@alwatr/logger';
import {LitElement} from 'lit';

import type {Constructor} from './type';
import type {AlwatrLogger} from '@alwatr/logger/type';
import type {Constructor} from './type.js';
import type {AlwatrLogger} from '@alwatr/logger/type.js';
import type {PropertyValues} from 'lit';

alwatrRegisteredList.push({
Expand Down
2 changes: 1 addition & 1 deletion packages/core/i18n/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {getJson} from '@alwatr/fetch';
import {alwatrRegisteredList, createLogger} from '@alwatr/logger';
import {SignalInterface} from '@alwatr/signal';

import type {I18nConfig, L10Resource, Locale} from './type';
import type {I18nConfig, L10Resource, Locale} from './type.js';

const logger = createLogger('alwatr/i18n');

Expand Down
2 changes: 1 addition & 1 deletion packages/core/logger/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {AlwatrLogger} from './type';
import type {AlwatrLogger} from './type.js';
export {AlwatrLogger};

const isBrowser = typeof process === 'undefined';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/math/src/math.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {TransformRangeOptions} from './type';
import {TransformRangeOptions} from './type.js';
export * from './unicode-digits.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core/router/src/core.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {createLogger, alwatrRegisteredList} from '@alwatr/logger';

import type {ParamList, RequestRouteParam, Route} from './type';
import type {ParamList, RequestRouteParam, Route} from './type.js';

alwatrRegisteredList.push({
name: '@alwatr/router',
Expand Down
12 changes: 6 additions & 6 deletions packages/core/router/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {joinParameterList, logger, routeSignalProvider} from './core';
import {routeChangeSignal} from './signal';
import {clickTrigger} from './trigger-click';
import {popstateTrigger} from './trigger-popstate';
import {joinParameterList, logger, routeSignalProvider} from './core.js';
import {routeChangeSignal} from './signal.js';
import {clickTrigger} from './trigger-click.js';
import {popstateTrigger} from './trigger-popstate.js';

import type {InitOptions, Route, RoutesConfig} from './type';
import type {InitOptions, Route, RoutesConfig} from './type.js';
import type {SignalInterface} from '@alwatr/signal';

export {routeChangeSignal};
export type {Route, RequestRouteParam, RoutesConfig} from './type';
export type {Route, RequestRouteParam, RoutesConfig} from './type.js';

/**
* Initial and config the Router.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/router/src/signal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SignalInterface} from '@alwatr/signal';

import type {RequestRouteParam, Route} from './type';
import type {RequestRouteParam, Route} from './type.js';

declare global {
interface AlwatrSignals {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/router/src/trigger-click.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {logger} from './core';
import {routeChangeSignal} from './signal';
import {logger} from './core.js';
import {routeChangeSignal} from './signal.js';

let _enabled = false;

Expand Down
4 changes: 2 additions & 2 deletions packages/core/router/src/trigger-popstate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {logger} from './core';
import {routeChangeSignal} from './signal';
import {logger} from './core.js';
import {routeChangeSignal} from './signal.js';

let _enabled = false;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/signal/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
SignalProvider,
SignalProviderOptions,
SignalStack,
} from './type';
} from './type.js';

export const logger = createLogger('alwatr/signal');

Expand Down
8 changes: 6 additions & 2 deletions packages/core/signal/src/signal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import {createLogger} from '@alwatr/logger';

import {_getSignalObject, _removeSignalListener, _setSignalProvider, _dispatchSignal, _addSignalListener} from './core';
import {
_getSignalObject, _removeSignalListener,
_setSignalProvider, _dispatchSignal,
_addSignalListener,
} from './core.js';

import type {
ListenerOptions,
Expand All @@ -10,7 +14,7 @@ import type {
SignalProviderOptions,
ListenerObject,
SignalObject,
} from './type';
} from './type.js';

/**
* Signal API interface as a remote controller.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/storage/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {createLogger} from '@alwatr/logger';

import {AlwatrStorage} from './storage.js';

import type {AlwatrStorageConfig, AlwatrStorageProviderConfig, DocumentObject} from './type';
import type {AlwatrStorageConfig, AlwatrStorageProviderConfig, DocumentObject} from './type.js';

// TODO: auto unload base of last usage time and memory limit.

Expand Down

0 comments on commit 4e91831

Please sign in to comment.