diff --git a/test/ssr/compile-with-webpack.js b/test/ssr/compile-with-webpack.js index 765898e966..6e648c8b48 100644 --- a/test/ssr/compile-with-webpack.js +++ b/test/ssr/compile-with-webpack.js @@ -4,6 +4,7 @@ import MemoryFS from 'memory-fs' export function compileWithWebpack (file, extraConfig, cb) { const config = Object.assign({ + mode: 'development', entry: path.resolve(__dirname, 'fixtures', file), module: { rules: [ diff --git a/test/ssr/ssr-template.spec.js b/test/ssr/ssr-template.spec.js index d93528466b..63b94e112e 100644 --- a/test/ssr/ssr-template.spec.js +++ b/test/ssr/ssr-template.spec.js @@ -1,4 +1,3 @@ -import webpack from 'webpack' import Vue from '../../dist/vue.runtime.common.js' import { compileWithWebpack } from './compile-with-webpack' import { createRenderer } from '../../packages/vue-server-renderer' @@ -14,11 +13,12 @@ function generateClientManifest (file, cb) { path: '/', filename: '[name].js' }, + optimization: { + runtimeChunk: { + name: 'manifest' + } + }, plugins: [ - new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', - minChunks: Infinity - }), new VueSSRClientPlugin() ] }, fs => { @@ -227,8 +227,8 @@ describe('SSR: template option', () => { `` + `` + // images and fonts are only preloaded when explicitly asked for - (options.preloadOtherAssets ? `` : ``) + (options.preloadOtherAssets ? `` : ``) + + (options.preloadOtherAssets ? `` : ``) + // unused chunks should have prefetch (options.noPrefetch ? `` : ``) + // css assets should be loaded