webpack.config.js 415 B

1234567891011121314151617181920
  1. const path = require('path');
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3. module.exports = {
  4. mode: 'development',
  5. entry: './src/main.js',
  6. output: {
  7. filename: 'main.bundle.js',
  8. path: path.resolve(__dirname, './dist'),
  9. },
  10. module: {
  11. rules: [
  12. {
  13. test: /\.css$/,
  14. use: ['style-loader', 'css-loader'],
  15. },
  16. ],
  17. },
  18. plugins: [new HtmlWebpackPlugin()],
  19. };