webpack.config.js 507 B

123456789101112131415161718192021222324
  1. var path = require("path");
  2. module.exports = {
  3. entry: {
  4. toasters: "./src/index.js",
  5. example: "./example/index.js"
  6. },
  7. output: {
  8. path: path.resolve(__dirname, "dist"),
  9. filename: "[name].js",
  10. library: "Toast",
  11. libraryTarget: "umd"
  12. },
  13. module: {
  14. rules: [
  15. { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" },
  16. { test: /\.css$/i, use: [ "style-loader", "css-loader" ] },
  17. ]
  18. },
  19. watchOptions: {
  20. poll: true,
  21. ignored: /node_modules/
  22. }
  23. }