webpack.build.config.js 383 B

123456789101112131415161718192021222324
  1. 'use strict'
  2. const { resolve } = require('path')
  3. const config = {
  4. mode: 'production',
  5. entry: './src/app.js',
  6. output: {
  7. path: resolve(__dirname, './dist'),
  8. filename: 'app.js',
  9. libraryTarget: 'umd'
  10. },
  11. module: {
  12. rules: [
  13. {
  14. test: /\.js$/,
  15. use: 'babel-loader',
  16. exclude: /node_modules/
  17. }
  18. ]
  19. }
  20. }
  21. module.exports = config