Guest User

Untitled

a guest
Jan 22nd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. module.exports = [
  2. {
  3. /*Client Side*/
  4. entry: './src/App.js',
  5. output:{
  6. path: path.resolve(__dirname, 'dist'),
  7. filename: "2FA.js",
  8. libraryTarget: 'umd',
  9. library: '2FA'
  10. },
  11. module: {
  12. rules: [
  13. {
  14. test: /.(js|jsx)$/,
  15. exclude: /node_modules/,
  16. use: {
  17. loader: "babel-loader"
  18. }
  19. },
  20. {
  21. test: /.html$/,
  22. use: {
  23. loader: "html-loader",
  24. options: { minimize: true }
  25. }
  26. },
  27. {
  28. test: /.css$/,
  29. use: [MiniCssExtractPlugin.loader,"css-loader"]
  30. }
  31. ]
  32. },
  33. plugins: [
  34. new HtmlWebPackPlugin({
  35. template: "./public/index.html",
  36. filename:"./index.html"
  37. }),
  38. new MiniCssExtractPlugin({
  39. filename: "[name].css",
  40. chunkFilename:"[id].css"
  41. })
  42. ]
  43. }
  44. ]
  45.  
  46. export default class TwoFA extends React.Component{
  47. render() {
  48. return (
  49. <div>
  50. /* All the staff */
  51. </div>
  52. );
  53. }
  54. }
  55.  
  56. import TwoFA from 'my-app/dist/2FA'
  57.  
  58. ReactDOM.render(<TwoFA />, document.getElementById('root'));
Add Comment
Please, Sign In to add comment