Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * WEBPACK UI CONFIGURATION
  3.  */
  4.  
  5. const path = require('path');
  6. const baseConfig = require('./webpack.base');
  7.  
  8.  
  9. const mainConfiguration = baseConfig({
  10.   entry: path.join(process.cwd(), 'src/ui/index.jsx'),
  11.  
  12.   // Don't use hashes in dev mode for better performance
  13.   output: {
  14.     path: path.resolve('src/ui'),
  15.     filename: 'react-dialog.js',
  16.     chunkFilename: '[name].chunk.js',
  17.     library: 'react-dialog'
  18.   },
  19.   plugins: [],
  20.   externals: {
  21.     'react': 'react'
  22.   }
  23. });
  24.  
  25. console.log(mainConfiguration, 'main')
  26.  
  27.  
  28. // module.exports = {
  29. //   mode: 'development',
  30. //   entry: path.join(process.cwd(), 'src/ui/index.jsx'),
  31. //   output: {
  32. //     path: path.resolve('src/ui'),
  33. //     filename: 'index-build.js',
  34. //     libraryTarget: 'commonjs2'
  35. //   },
  36. //   module: {
  37. //     rules: [{
  38. //       test: /\.(js|jsx)$/,
  39. //       exclude: /(node_modules)/,
  40. //       use: {
  41. //         loader: 'babel-loader'
  42. //       }
  43. //     }]
  44. //   },
  45. //   resolve: {
  46. //     extensions: ['.js', '.jsx']
  47. //   }
  48. // }
  49.  
  50.  
  51. module.exports = [mainConfiguration];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement