https://github.com/react-boilerplate/react-boilerplate
После запуска сборки пряжи, начало пряжи: prod Он говорит, что он работает в окне терминала, однако когда я перехожу к http: // локальный: 3000, URL-адрес внезапно меняется на => https: // localhost / и говорит этот сайт недоступен localhost отказался подключиться.
запуск пряжи в режиме развития работает нормально
Я удалил ImmutableJS, следуя инструкциям по одной из проблем в react-template.
Я добавил перьяJS backend, frontend.
Я поменял babel-loader в webpack.base.babel.js к
rules: [
{
test: /\.js$/, // Transform all .js files required somewhere with Babel
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: options.babelQuery,
query: {
plugins: [
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
],
},
},
},
Я изменил файл app.js
// Install ServiceWorker and AppCache in the end since
// it's not most important operation and if main code fails,
// we do not want it installed
if (process.env.NODE_ENV === 'production') {
// require('offline-plugin/runtime').install(); // eslint-disable-line global-require
const runtime = require('offline-plugin/runtime');
runtime.install({
onUpdating: () => {
console.info('SW Event:', 'onUpdating');
},
onUpdateReady: () => {
console.info('SW Event:', 'onUpdateReady');
// Tells to new SW to take control immediately
runtime.applyUpdate();
},
onUpdated: () => {
console.info('SW Event:', 'onUpdated');
// Reload the webpage to load into the new version
window.location.reload();
},
onUpdateFailed: () => {
console.info('SW Event:', 'onUpdateFailed');
}
});
}
Большое спасибо за вашу помощь!
(Добавьте ссылку на демонстрацию на https://jsfiddle.net или аналогичном, если возможно)
package.json): 3.6.0




Я забыл, что использовал ssl-redirect для развертывания heroku.
var sslRedirect = require('heroku-ssl-redirect');
// heroku enable ssl redirect
app.use(sslRedirect()); //heroku https
ваше здоровье :)