Changeset View
Changeset View
Standalone View
Standalone View
landing/webpack.config.cjs
const AssetsPlugin = require('assets-webpack-plugin'); | |||||
const path = require('path'); | const path = require('path'); | ||||
const { WebpackManifestPlugin } = require('webpack-manifest-plugin'); | |||||
const { | const { | ||||
createProdBrowserConfig, | createProdBrowserConfig, | ||||
createDevBrowserConfig, | createDevBrowserConfig, | ||||
createNodeServerRenderingConfig, | createNodeServerRenderingConfig, | ||||
} = require('lib/webpack/shared.cjs'); | } = require('lib/webpack/shared.cjs'); | ||||
const babelConfig = require('./babel.config.cjs'); | const babelConfig = require('./babel.config.cjs'); | ||||
Show All 30 Lines | static: { | ||||
directory: path.join(__dirname, 'dist'), | directory: path.join(__dirname, 'dist'), | ||||
}, | }, | ||||
}, | }, | ||||
}; | }; | ||||
const baseProdBrowserConfig = { | const baseProdBrowserConfig = { | ||||
...baseBrowserConfig, | ...baseBrowserConfig, | ||||
plugins: [ | plugins: [ | ||||
new AssetsPlugin({ | new WebpackManifestPlugin({ | ||||
filename: 'assets.json', | publicPath: '', | ||||
path: path.join(__dirname, 'dist'), | |||||
removeFullPathAutoPrefix: true, | |||||
}), | }), | ||||
], | ], | ||||
}; | }; | ||||
const baseNodeServerRenderingConfig = { | const baseNodeServerRenderingConfig = { | ||||
externals: ['react', 'react-dom', 'react-redux'], | externals: ['react', 'react-dom', 'react-redux'], | ||||
entry: { | entry: { | ||||
server: ['./landing-ssr.react.js'], | server: ['./landing-ssr.react.js'], | ||||
Show All 23 Lines |