Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/flat-hats-flow.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ import { RuntimeGlobals as LynxRuntimeGlobals } from '@lynx-js/webpack-runtime-g

import { createChunkLoadingRuntimeModule } from './ChunkLoadingRuntimeModule.js';
import { createCssChunkLoadingRuntimeModule } from './CssChunkLoadingRuntimeModule.js';
import { StartupChunkDependenciesPlugin } from './StartupChunkDependenciesPlugin.js';

import type { ChunkLoadingWebpackPluginOptions } from './index.js';

export class ChunkLoadingWebpackPluginImpl {
name = 'ChunkLoadingWebpackPlugin';
_asyncChunkLoading = true;

static chunkLoadingValue = 'lynx';

Expand All @@ -36,11 +34,6 @@ export class ChunkLoadingWebpackPluginImpl {
return;
}

new StartupChunkDependenciesPlugin({
chunkLoading: ChunkLoadingWebpackPluginImpl.chunkLoadingValue,
asyncChunkLoading: this._asyncChunkLoading,
}).apply(compiler);

// javascript chunk loading
compiler.hooks.thisCompilation.tap(this.name, (compilation) => {
const ChunkLoadingRuntimeModule = createChunkLoadingRuntimeModule(
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,3 @@ it('should work with chunk loading require', async function() {
expect(lynx.requireModuleAsync).toBeCalled();
});
});

it('should contain startup chunk dependencies code', async () => {
const bundlePath = path.join(
__dirname,
'rspack.bundle.js',
);
const content = await fs.promises.readFile(bundlePath, 'utf-8');
// why appears twice:
// 1. Injected by StartupChunkDependenciesPlugin
// 2. Existing in test case's own bundle
expect((content.match(/Lynx startup chunk dependencies/g) || []).length).toBe(
2,
);
});
Loading