|
| 1 | +// File helpful for debugging issues with dependencies only used by the hot reload server |
| 2 | +// node-debug webpack --config webpack.test-hot.config.js |
| 3 | + |
| 4 | +var path = require("path"); |
| 5 | +var config = require("./webpack.common.config"); |
| 6 | +var webpack = require("webpack"); |
| 7 | + |
| 8 | +// We're using the bootstrap-sass loader. |
| 9 | +// See: https://github.com/justin808/bootstrap-sass-loader |
| 10 | +config.entry.push("./scripts/webpack_only", |
| 11 | + "bootstrap-sass!./bootstrap-sass.config.js"); // custom bootstrap |
| 12 | +config.output = { filename: "express-bundle.js", // this file is served directly by webpack |
| 13 | + path: __dirname }; |
| 14 | +//config.plugins = [ new webpack.HotModuleReplacementPlugin() ]; |
| 15 | +config.devtool = "eval-source-map"; |
| 16 | + |
| 17 | +// All the styling loaders only apply to hot-reload, not rails |
| 18 | +config.module.loaders.push( |
| 19 | + { test: /\.jsx$/, loaders: ["react-hot", "es6", "jsx?harmony"] }, |
| 20 | + { test: /\.css$/, loader: "style-loader!css-loader" }, |
| 21 | + { test: /\.scss$/, loader: "style!css!sass?outputStyle=expanded&imagePath=/assets/images&includePaths[]=" + |
| 22 | + path.resolve(__dirname, "./assets/stylesheets")}, |
| 23 | + |
| 24 | + // The url-loader uses DataUrls. The file-loader emits files. |
| 25 | + { test: /\.woff$/, loader: "url-loader?limit=10000&minetype=application/font-woff" }, |
| 26 | + { test: /\.woff2$/, loader: "url-loader?limit=10000&minetype=application/font-woff" }, |
| 27 | + { test: /\.ttf$/, loader: "file-loader" }, |
| 28 | + { test: /\.eot$/, loader: "file-loader" }, |
| 29 | + { test: /\.svg$/, loader: "file-loader" }); |
| 30 | + |
| 31 | +module.exports = config; |
0 commit comments