- Notifications
You must be signed in to change notification settings - Fork 10
Description
@Alex-ray Thanks for your reply - yes I watched your video walk through and I am pretty clear now - how it works. I have couple more questions -
when I run npm build and npm start prod set up I am getting
ReferenceError: self is not defined
at ../build/prerender.js:32:2098
is it because of the css/sass loaders I have? This is my loader configuration - I basically have 1 main.scss and include rest of the component specific css within this file -
{ test: /.(png|jpg|jpeg|gif|svg)$/, loader: 'url-loader?name=img/img-[hash:6].[ext]&limit=5000' },
{
test: /.scss/,
loader: [
'style-loader',
{
loader: 'css-loader',
options: {
sourceMap: true,
url: false
}
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
url: false
}
}
]
},
const makeRoutes = require('../../build/prerender');
const routes = makeRoutes(store);
why do we need to take it as a bundle here - can we not pass directly 1 route file?
And last question - which is the right place to make a call to external API and how do I pass in the data coming back into appropriate components? can I take counter.js actions as an example? but I dont see we are injecting actual data from server anywhere. Could you please give me some direction here.