Sha256: fec045b8fe0e62b1d9989b2ed2bba0bc07015ba16186c471104ca409ddf82e65
Contents?: true
Size: 907 Bytes
Versions: 1
Compression:
Stored size: 907 Bytes
Contents
const webpack = require("webpack"); const config = require("./shared"); const sassLoader = require("./loaders/sass"); config.output.publicPath = "http://localhost:8080/assets/"; function devServerEntries() { var entry = {}; Object.keys(config.entry).forEach((key) => { var existing = config.entry[key]; var entries = (existing instanceof Array) ? existing.slice() : Array.of(existing); entry[key] = entries.concat([ "webpack-dev-server/client?http://localhost:8080", "webpack/hot/only-dev-server" ]); }); return entry; } config.entry = devServerEntries(); config.plugins.unshift(new webpack.HotModuleReplacementPlugin()); config.module.rules.push(sassLoader); config.devServer = { contentBase: config.output.path, publicPath: config.output.publicPath, hot: true, inline: true }; config.devtool = "inline-eval-cheap-source-map"; module.exports = config;
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
webpack_on_rails-0.1.0 | lib/generators/webpack_on_rails/templates/client/config/server.development.js |