Skip to content

Commit 345ccc1

Browse files
RichiCoder1serifine
authored andcommitted
refactor(index): wrap exports in PLATFORM.moduleName
wrap global exports with PLATFORM.moduleName for webpack (and other static loader) compatibility.
1 parent 30c2f75 commit 345ccc1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/index.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FrameworkConfiguration } from 'aurelia-framework';
1+
import { FrameworkConfiguration, PLATFORM } from 'aurelia-framework';
22
import { AureliaUX } from './aurelia-ux';
33

44
export { swatches } from './colors/swatches';
@@ -22,17 +22,17 @@ export { UXConfiguration } from './ux-configuration';
2222

2323
export function configure(config: FrameworkConfiguration, callback?: (config: AureliaUX) => Promise<any>) {
2424
config.globalResources([
25-
'./button/ux-button',
26-
'./input/ux-input',
27-
'./input-info/ux-input-info',
28-
'./textarea/ux-textarea',
29-
'./form/ux-form',
30-
'./form/ux-field',
31-
'./form/ux-submit-attribute',
32-
'./chip-input/ux-chip-input',
33-
'./chip-input/ux-chip',
34-
'./chip-input/ux-tag',
35-
'./checkbox/ux-checkbox'
25+
PLATFORM.moduleName('./button/ux-button'),
26+
PLATFORM.moduleName('./input/ux-input'),
27+
PLATFORM.moduleName('./input-info/ux-input-info'),
28+
PLATFORM.moduleName('./textarea/ux-textarea'),
29+
PLATFORM.moduleName('./form/ux-form'),
30+
PLATFORM.moduleName('./form/ux-field'),
31+
PLATFORM.moduleName('./form/ux-submit-attribute'),
32+
PLATFORM.moduleName('./chip-input/ux-chip-input'),
33+
PLATFORM.moduleName('./chip-input/ux-chip'),
34+
PLATFORM.moduleName('./chip-input/ux-tag'),
35+
PLATFORM.moduleName('./checkbox/ux-checkbox')
3636
]);
3737

3838
const ux = config.container.get(AureliaUX) as AureliaUX;

0 commit comments

Comments
 (0)