Created
March 6, 2018 12:23
-
-
Save innovid-rnd/947ddfc8eeaea3e371fe8091023c542a to your computer and use it in GitHub Desktop.
webpack 4 loading vendors into vendor.js and generating a manifest file which includes the webpack runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode: "production", | |
entry: { | |
app: path.join(__dirname, "index.tsx"), | |
}, | |
output: { | |
path: path.resolve(__dirname, "public/dist"), | |
publicPath: "", | |
chunkFilename: "[name].js", | |
filename: "[name].js" | |
}, | |
optimization: { | |
runtimeChunk: { | |
name: "manifest" | |
}, | |
splitChunks: { | |
cacheGroups: { | |
vendor: { | |
test: /[\\/]node_modules[\\/]/, | |
name: "vendors", | |
priority: -20, | |
chunks: "all" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment