Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Remove redundant custom chunk preloading code
Browse files Browse the repository at this point in the history
  • Loading branch information
rtsao committed Jul 27, 2018
1 parent c6a6459 commit 135eb76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 80 deletions.
72 changes: 0 additions & 72 deletions build/chunk-preload-plugin.js

This file was deleted.

4 changes: 0 additions & 4 deletions build/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const resolveFrom = require('resolve-from');
const AssetsManifestPlugin = require('@nadiia/file-loader')
.assetsManifestPlugin;
const ClientSourceMapPlugin = require('./client-source-map-plugin');
const ChunkPreloadPlugin = require('./chunk-preload-plugin');
const ChunkModuleManifestPlugin = require('./chunk-module-manifest-plugin');
const chunkModuleManifest = require('./chunk-module-manifest');
const InstrumentedImportDependencyTemplatePlugin = require('./instrumented-import-dependency-template-plugin');
Expand Down Expand Up @@ -448,9 +447,6 @@ function getConfig({target, env, dir, watch, cover}) {
env === 'production' &&
target === 'web' &&
new webpack.HashedModuleIdsPlugin(),
target === 'web' && env !== 'test' && new ChunkPreloadPlugin(),
// TODO(#11): What do we do for client-side error reporting in the service worker?
// Do we add in reporting code to the sw? Should we map stack traces on the server?
target === 'web' && new ClientSourceMapPlugin(),
target === 'web' && new SyncChunkIdsPlugin(),
target === 'web' &&
Expand Down
8 changes: 4 additions & 4 deletions test/cli/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ test('`fusion build` app with dynamic imports integration', async t => {
);
t.equal(
await page.$$eval('script', els => els.length),
6,
'should be 6 scripts'
5,
'should be 5 scripts'
);
await page.click('#split-route-link');

t.equal(
await page.$$eval('script', els => els.length),
7,
'should be 7 scripts after dynamic loading'
6,
'should be 6 scripts after dynamic loading'
);

t.ok(
Expand Down

0 comments on commit 135eb76

Please sign in to comment.