Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit a735e96

Browse files
committed
fix(deeplinks): provide deep-links config to webpack as needed vs via the constructor
provide deep-links config to webpack as needed vs via the constructor
1 parent 5b7243d commit a735e96

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/webpack/ionic-environment-plugin.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
import { getParsedDeepLinkConfig } from '../util/helpers';
12
import { BuildContext, HydratedDeepLinkConfigEntry } from '../util/interfaces';
23
import { Logger } from '../logger/logger';
34
import { getInstance } from '../util/hybrid-file-system-factory';
45
import { createResolveDependenciesFromContextMap } from './util';
56

67
export class IonicEnvironmentPlugin {
7-
constructor(private context: BuildContext, private parsedDeepLinkConfigs: HydratedDeepLinkConfigEntry[]) {
8+
constructor(private context: BuildContext) {
89
}
910

1011
apply(compiler: any) {
1112

1213
compiler.plugin('context-module-factory', (contextModuleFactory: any) => {
13-
const webpackDeepLinkModuleDictionary = convertDeepLinkConfigToWebpackFormat(this.parsedDeepLinkConfigs);
14+
const deepLinkConfig = getParsedDeepLinkConfig();
15+
const webpackDeepLinkModuleDictionary = convertDeepLinkConfigToWebpackFormat(deepLinkConfig);
1416
contextModuleFactory.plugin('after-resolve', (result: any, callback: Function) => {
1517
if (!result) {
1618
return callback();

src/webpack/ionic-webpack-factory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { getIonicDependenciesCommonChunksPlugin, getNonIonicDependenciesCommonChunksPlugin } from './common-chunks-plugins';
22
import { IonicEnvironmentPlugin } from './ionic-environment-plugin';
33
import { provideCorrectSourcePath } from './source-mapper';
4-
import { getContext, getParsedDeepLinkConfig } from '../util/helpers';
4+
import { getContext } from '../util/helpers';
55

66
export function getIonicEnvironmentPlugin() {
77
const context = getContext();
8-
return new IonicEnvironmentPlugin(context, getParsedDeepLinkConfig());
8+
return new IonicEnvironmentPlugin(context);
99
}
1010

1111
export function getSourceMapperFunction(): Function {

0 commit comments

Comments
 (0)