Skip to content

Commit

Permalink
FIX webpack entry still referring to 'preview'
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Aug 2, 2018
1 parent cec1a3a commit 07dcc76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/core/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { version } from '../../../package.json';
export default ({ configDir, quiet, babelOptions }) => {
const entries = getEntries(configDir, true);
const entriesMeta = {
preview: {
iframe: {
headHtmlSnippet: getPreviewHeadHtml(configDir, process.env),
bodyHtmlSnippet: getPreviewBodyHtml(),
},
Expand All @@ -34,8 +34,8 @@ export default ({ configDir, quiet, babelOptions }) => {
devtool: 'cheap-module-source-map',
entry: {
...entries,
preview: [
...entries.preview,
iframe: [
...entries.iframe,
`${require.resolve('webpack-hot-middleware/client')}?reload=true`,
],
},
Expand Down
4 changes: 2 additions & 2 deletions lib/core/src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { includePaths, excludePaths, loadEnv, nodePaths, getEntries } from './ut
export default ({ configDir, babelOptions }) => {
const entries = getEntries(configDir);
const entriesMeta = {
preview: {
iframe: {
headHtmlSnippet: getPreviewHeadHtml(configDir, process.env),
bodyHtmlSnippet: getPreviewBodyHtml(),
},
Expand Down Expand Up @@ -86,7 +86,7 @@ export default ({ configDir, babelOptions }) => {
modules: ['node_modules'].concat(nodePaths),
},
optimization: {
// Automatically split vendor and commons for preview bundle
// Automatically split vendor and commons for iframe bundle
// https://twitter.com/wSokra/status/969633336732905474
splitChunks: {
chunks: chunk => chunk.name !== 'manager',
Expand Down

0 comments on commit 07dcc76

Please sign in to comment.