webpack.config.js 319 B

12345678910111213
  1. const path = require('path');
  2. module.exports = (env, argv) =>{
  3. return {
  4. entry: './src/index.js',
  5. output: {
  6. path: path.resolve(__dirname, 'dist'),
  7. filename: argv.mode === 'production' ? 'morus.[contenthash].bundle.js' : 'morus.js',
  8. },
  9. target: 'node',
  10. externals : { canvas: {} }
  11. };
  12. };