webpack.config.js 502 B

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. module.exports = {
  3. entry: {
  4. playground: "./playground/index.js"
  5. },
  6. output: {
  7. filename: "[name].js",
  8. path: __dirname + "/static/"
  9. },
  10. module: {
  11. rules: [
  12. {
  13. test: /\.js$/,
  14. exclude: /node_modules/,
  15. loader: "babel-loader",
  16. options: {
  17. presets: ["env", "react"]
  18. }
  19. }
  20. ]
  21. },
  22. externals: {
  23. clipboard: "ClipboardJS",
  24. codemirror: "CodeMirror",
  25. react: "React",
  26. "react-dom": "ReactDOM"
  27. }
  28. };