Skip to content

Commit

Permalink
module type
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrf1 committed Jun 21, 2023
1 parent ae543f9 commit fc6d54d
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions dotcom-rendering/scripts/webpack/webpack.config.components.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,41 +68,25 @@ const getLoaders = (bundle) => {
module.exports = ({ bundle, sessionId }) => ({
entry: {
// index: './src/web/components/marketing/index.ts',
index: './src/web/components/marketing/ContributionsEpic.tsx',
ContributionsEpic:
'./src/web/components/marketing/ContributionsEpic.tsx',
},
optimization: {
runtimeChunk: true,
// splitChunks: {
// cacheGroups: {
// // our own chunk, which is shared between all bundles
// frameworks: {
// test: /[\\/]node_modules[\\/](preact|react-is|hoist-non-react-statistics|swr|@emotion|stylis)[\\/]/,
// chunks: 'all',
// name: 'frameworks',
// enforce: true,
// },
// // defining our own chunk above overrides the webpack defaults,
// // so now we restore them
// // https://webpack.js.org/plugins/split-chunks-plugin/#optimizationsplitchunks
// defaultVendors: {
// test: /[\\/]node_modules[\\/]/,
// priority: -10,
// reuseExistingChunk: true,
// },
// default: {
// minChunks: 2,
// priority: -20,
// reuseExistingChunk: true,
// },
// },
// },
},
experiments: {
// Necessary for `libraryTarget: 'module'`
outputModule: true,
},
output: {
filename: (data) => {
return `marketing/[name].js`;
},
// chunkFilename: generateName(bundle),
publicPath: '',
library: {
type: 'module',
},
// module: true
},
plugins: [
// new WebpackManifestPlugin({
Expand Down

0 comments on commit fc6d54d

Please sign in to comment.