Target (TGT 0.70%) CEO Brian Cornell has done a good job keeping his company relevant in a rapidly changing retail environment. He has done that by embracing private-label merchandise, launching more small-format locations, remodeling existing stores, improving customer service, and investing heavily in fulfillment technology.

The challenge for Cornell, however, is continuing to keep pace with Wal-Mart (WMT -0.32%) and Amazon (AMZN -1.11%). It's a daunting task when you consider the size of those two companies and their ability to change how the game is played.

The ribbon cutting of a small format Target.

Target has been opening small-format stores in urban markets. Image source: Target.

How is Target doing now?

So far, the company's efforts have paid off. It reported fourth quarter and full-year earnings per share of $2.02 and $5.32, respectively. That's up from $1.46 and $4.58 in 2016. In addition, traffic grew 3.2% in Q4, while comparable digital sales rose by 29%.

"Our fourth quarter results demonstrate the power of the significant investments we've made in our team and our business throughout 2017," said Cornell in the earnings release. "Our team's outstanding execution of Target's strategic initiatives during the year delivered strong fourth quarter traffic growth in our stores and digital channels, which drove healthy comparable sales in every one of our five core merchandise categories."

Rough waters ahead

Target's challenge is that it's fighting against two competitors with nearly limited resources.

For example, Wal-Mart and Amazon are both pushing into same-day delivery. To keep up, Target has purchased Shipt, a delivery fulfillment company. That's a risky move; the retailer has chosen to build out its own same-day delivery capacity, rather than work with an established player like Instacart.

That's the type of decision Cornell faces on a regular basis. Should Target own its own infrastructure, or partner with others to split up the risk? As Amazon and Walmart push the delivery needle forward -- adding drone delivery and who knows what else -- it will be a challenge for Target to keep up.

The same will be true across a number of other areas. Target will need to continue to evolve its app and digital presence, while also planning for whatever its larger rivals might do.

Will stores be relevant?

Target plans to remodel 1,000 stores by 2020. It's also opening small-format stores in urban areas.

These changes have shown strong early results. The challenge facing the company is whether there will be as strong a need for stores in a few years.

Stores, of course, can serve as warehouses for same-day delivery, but that's a different model than the one Target has been pursuing. The chain has built its new small stores around the needs of urban shoppers -- more grab and go along with smaller-sized merchandise. Its store remodels embrace that model, while also offering a traditional shopping experience.

These changes make sense now, but if same-day delivery inches toward one-hour delivery, the need for stores could shift again.

Target is doing well so far

Target's stock growth is at risk because the chain has such a small margin for error. It's more of a follower than a leader when it comes to innovation. That's not a knock: It makes sense to allow Amazon and Wal-Mart to take the lead, then follow quickly when a new innovation works.

The challenge for the company is going to be growing profits when the investment needed just to keep up remains unknown. Cornell has shown that he's adept at giving consumers a reason to shop at Target when it's generally not the cheapest option, and he has also shown an ability to follow closely on the heels of his chain's bigger rivals.

Those are both skills Target will need as the retail evolution continues over the next few years. So far, the chain has been handling its challenges well -- but even a small stumble could stall its stock growth in 2018.