Skip to content

Instantly share code, notes, and snippets.

@KrisKnez
Created March 8, 2022 23:51
Show Gist options
  • Select an option

  • Save KrisKnez/4ea63dc5cc6bb83fb2976635f56955a3 to your computer and use it in GitHub Desktop.

Select an option

Save KrisKnez/4ea63dc5cc6bb83fb2976635f56955a3 to your computer and use it in GitHub Desktop.
Sample of a webpack video loader configuration for Next.JS
const nextConfig = {
webpack: function (config, options) {
config.module.rules.push({
test: /\.mp4$/,
use: [
{
loader: "file-loader",
options: {
name: "[name].[ext]",
outputPath: "static/media",
},
},
],
});
return config;
},
};
module.exports = nextConfig;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment