webpack.config.js 515 B

12345678910111213141516171819
  1. const path = require('path');
  2. module.exports = {
  3. entry: './NFTmarket/assets/index.js', // path to our input file
  4. output: {
  5. filename: 'index-bundle.js', // output bundle file name
  6. path: path.resolve(__dirname, './NFTmarket/static'), // path to our Django static directory
  7. },
  8. module: {
  9. rules: [
  10. {
  11. test: /\.(js|jsx)$/,
  12. exclude: /node_modules/,
  13. loader: "babel-loader",
  14. options: { presets: ["@babel/preset-env", "@babel/preset-react"] }
  15. },
  16. ]
  17. }
  18. };