Created
March 8, 2022 23:51
-
-
Save KrisKnez/4ea63dc5cc6bb83fb2976635f56955a3 to your computer and use it in GitHub Desktop.
Sample of a webpack video loader configuration for Next.JS
This file contains hidden or 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
| 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