Guest User

Untitled

a guest
Dec 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. const path = require('path');
  2. const nodeExternals = require('webpack-node-externals');
  3.  
  4. module.exports = (env, argv) => {
  5. const settings = {
  6. entry: '.src/main.js',
  7. target: 'node',
  8. module: {
  9. rules: [
  10. {
  11. test: /\.js$/,
  12. use: "babel-loader",
  13. exclude: /node_modules/
  14. }
  15. ]
  16. },
  17. output: {
  18. filename: 'index.js',
  19. path: path.resolve(__dirname, '../dist'),
  20. libraryTarget: 'this'
  21. },
  22. externals: [nodeExternals()]
  23. };
  24. return settings;
  25. };
Add Comment
Please, Sign In to add comment