webpack.config.js.tpl 468 B

123456789101112131415161718192021222324252627
  1. const path = require('path');
  2. module.exports = {
  3. entry: './src/index.js',
  4. output: {
  5. path: path.join(__dirname, 'example_dist'),
  6. filename: '[name].chunk.js',
  7. },
  8. module: {
  9. rules: [
  10. {
  11. test: /\.js$/,
  12. use: [
  13. {
  14. loader: 'example-loader',
  15. options: {},
  16. },
  17. ],
  18. },
  19. ],
  20. },
  21. resolveLoader: {
  22. alias: {
  23. 'example-loader': require.resolve('../../src/'),
  24. },
  25. },
  26. };