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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a5d456c45fbc0584e9f646ed128a2007018674e
|
4
|
+
data.tar.gz: a654c4cff34ea096778664f2126d41c6b690e9d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea244ac718bf78d7fe85b80fe295b8b1b930fcbf2abf2b5cd08d7a7c6f2e178deb12b388dfe05dcb3d3b6bb25f511c7cdbec3eb126a232f159dd8cd9fb28e8ac
|
7
|
+
data.tar.gz: 682fad8a0ce7c4f24c286ff28fa3f0c1bb5b218fd54d063b08675447199b9c06cc16f65e66154e930ab04e6164d2140f5843ad0aa5e680b3c5a16b784f53522c
|
@@ -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}
|
35
|
+
return %{document.write('<script src="#{dev_server_base_url}/#{bundle_filename}"></script>');}
|
36
36
|
end
|
37
37
|
return ''
|
38
38
|
end
|
@@ -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
|
-
|
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)) {
|