暂无描述

webpack.config.js 677B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * External dependencies
  3. */
  4. const getBaseWebpackConfig = require( '@automattic/calypso-build/webpack.config.js' );
  5. const path = require( 'path' );
  6. const baseConfig = getBaseWebpackConfig(
  7. { WP: false },
  8. {
  9. entry: {}, // We'll override later
  10. 'output-filename': '[name].js',
  11. 'output-path': path.join( __dirname, './dist' ),
  12. }
  13. );
  14. module.exports = [
  15. {
  16. ...baseConfig,
  17. resolve: {
  18. ...baseConfig.resolve,
  19. modules: [ 'node_modules' ],
  20. },
  21. entry: {
  22. 'lazy-images': path.join( __dirname, './src/js/lazy-images.js' ),
  23. 'intersection-observer': path.join(
  24. __dirname,
  25. './node_modules/intersection-observer/intersection-observer.js'
  26. ),
  27. },
  28. },
  29. ];