webpack.config.js 539 B

1234567891011121314151617181920212223
  1. const path = require('path');
  2. module.exports = {
  3. entry: path.resolve(__dirname, 'js', 'index.js'),
  4. output: {
  5. path: path.resolve(__dirname, 'static'),
  6. filename: 'lc.js'
  7. },
  8. resolve: {
  9. extensions: ['.js', '.jsx']
  10. },
  11. module: {
  12. rules: [
  13. {
  14. test: /\.jsx/,
  15. use: {
  16. loader: 'babel-loader',
  17. options: { presets: ['@babel/preset-react', '@babel/preset-env'] }
  18. }
  19. }
  20. ]
  21. }
  22. };