Skip to content

Instantly share code, notes, and snippets.

@brunos3d
Last active October 24, 2023 22:36
Show Gist options
  • Save brunos3d/3717e55b805b8ea0ce715f79703ef145 to your computer and use it in GitHub Desktop.
Save brunos3d/3717e55b805b8ea0ce715f79703ef145 to your computer and use it in GitHub Desktop.
How to proper infer Webpack types to webpack.config.js
const path = require('path');
/**
* @type {import('webpack').Configuration & { devServer?: import('webpack-dev-server').Configuration }}}
*/
module.exports = {
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment