webpack_rails 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bfa0cf39a171ee931bedb78733ca635870d5ba12
4
- data.tar.gz: b645e6903a0551382e185ead553cc82721e61a32
3
+ metadata.gz: 2a5d456c45fbc0584e9f646ed128a2007018674e
4
+ data.tar.gz: a654c4cff34ea096778664f2126d41c6b690e9d0
5
5
  SHA512:
6
- metadata.gz: 63ac4b27c71478534f07c64090461961cc16a1113d2bcf746e998ba77109302edf3194cd9afee11f0bc1e107876fa5852a364b54d624cf342fbb3a45bd18aa19
7
- data.tar.gz: d8573b2624db339e08b95123c595119a843020491c25493eff22517bd7cd000467bece2d7078457d0ad31f90f564b8c4fd6e225699fe7907f71f99e61a2240c6
6
+ metadata.gz: ea244ac718bf78d7fe85b80fe295b8b1b930fcbf2abf2b5cd08d7a7c6f2e178deb12b388dfe05dcb3d3b6bb25f511c7cdbec3eb126a232f159dd8cd9fb28e8ac
7
+ data.tar.gz: 682fad8a0ce7c4f24c286ff28fa3f0c1bb5b218fd54d063b08675447199b9c06cc16f65e66154e930ab04e6164d2140f5843ad0aa5e680b3c5a16b784f53522c
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack_rails",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "",
5
5
  "main": "webpack-dev-server.js",
6
6
  "scripts": {
@@ -32,7 +32,7 @@ module WebpackRails
32
32
  def process_require(context, locals, bundle_filename)
33
33
  if config[:dev_server]
34
34
  if bundle_filename.end_with? '.js'
35
- return %{document.write('<script src="#{dev_server_base_url}/#{bundle_filename}?reload=#{config[:dev_server_reload]}"></script>');}
35
+ return %{document.write('<script src="#{dev_server_base_url}/#{bundle_filename}"></script>');}
36
36
  end
37
37
  return ''
38
38
  end
@@ -10,7 +10,6 @@ module WebpackRails
10
10
  protocol: 'http',
11
11
  host: 'localhost',
12
12
  port: 9876,
13
- dev_server_reload: true, # reload when HMR fails
14
13
  }
15
14
 
16
15
  module EnvironmentWebpackInstanceMethods
@@ -1,4 +1,5 @@
1
1
  var path = require('path');
2
+ var querystring = require('querystring')
2
3
  var xtend = require('xtend');
3
4
  var isArray = require('is-array');
4
5
  var isString = require('is-string');
@@ -44,6 +45,7 @@ function runWebpackDevServer(opts, done) {
44
45
  opts.host = opts.host || 'localhost';
45
46
  opts.port = opts.port || 9876;
46
47
  opts.webpack_config_file = opts.webpack_config_file || path.resolve('./config/webpack.config.js');
48
+ opts.dev_server_reload = opts.dev_server_reload === false ? false : true
47
49
 
48
50
  var devServerConfig;
49
51
  try {
@@ -95,7 +97,10 @@ function makeDevServerConfig(opts) {
95
97
 
96
98
  // inject webpack-dev-server & hot module reload clients into each bundle
97
99
  var devServerClientScripts = [
98
- require.resolve('webpack-hot-middleware/client')+'?path='+publicUrl+'/__webpack_hmr',
100
+ require.resolve('webpack-hot-middleware/client')+'?'+querystring.stringify({
101
+ path: publicUrl+'/__webpack_hmr',
102
+ reload: opts.dev_server_reload,
103
+ }),
99
104
  ];
100
105
 
101
106
  if (isArray(devServerConfig.entry) || isString(devServerConfig.entry)) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpack_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Friend