The market punished Target (NYSE:TGT) on Wednesday when the retailer reported its first-quarter results. While revenue growth was solid, the bottom line missed expectations, dragged down by spending on store remodels and e-commerce initiatives.

I think the market is missing the forest for the trees. Yes, Target's margins are being pressured, and that's unlikely to change anytime soon. But not only are in-store sales growing at a robust pace, driven by store remodels and new exclusive brands, but the company has come out swinging in the past few months with its various e-commerce initiatives. The 28% e-commerce sales growth reported during the first quarter may be just the start.

The exterior of a Target store.

Image source: Target.

Investing in stores and people

Target managed to produce comparable sales growth of 3% during the first quarter, driven by traffic growth of 3.7%. That's the strongest traffic growth in more than a decade.

This performance was driven by a few things. Target has been remodeling some of its stores, completing 56 remodels during the first quarter alone. Each store that goes through this process enjoys a 2% to 4% sales increase, according to CEO Brian Cornell. This is a classic case of short-term pain, long-term gain. A retailer can't succeed in the long run by under-investing in its stores. Sears is an example of what happens when stores are left to decay.

Target has also invested in new, exclusive brands. The company launched three new brands during the first quarter, and it plans to launch four additional brands during the second quarter. These brands help differentiate Target from the competition, giving customers a reason to visit its stores.

Wage hikes may also be contributing to Target's strong performance. The company announced a plan last year to boost the minimum hourly wage to $15 by the end of 2020. The minimum wage was boosted to $11 an hour last October as part of the plan, and Target expects to raise it to $12 an hour this year. Higher wages will take a bite out of profits in the short term, but the potential payoff is an increase in productivity and employee morale.

That's especially important for Target, because its e-commerce strategy revolves around its stores.

How Target plans to win e-commerce

Target's online sales grew by 28% year over year during the first quarter, up from 21% growth in the prior-year period. That's a nice boost, but the company's e-commerce strategy only started to take shape in the past few months. Online growth could accelerate as those initiatives take hold.

Everything Target is doing in e-commerce is anchored to its stores. The company acquired same-day delivery company Shipt late last year, using the purchase to launch same-day grocery delivery from about half of its stores. Target expects this service to be available at most of its stores by the holiday season.

In March, Target rolled out free two-day shipping on orders over $35, with no minimum order size for those using a REDcard. Hundreds of thousands of items are eligible, meaning Amazon's (NASDAQ:AMZN) selection of items that ship with Prime is still larger by orders of magnitude. But Target's free shipping requires no membership fees, unlike Amazon Prime. Target is using its stores to fulfill the bulk of these online orders, allowing it to offer free fast shipping without needing to replicate Amazon's vast distribution network.

Earlier this month, Target launched Restock, its next-day service for essentials, nationwide. Similar to Amazon Prime Pantry, up to 45 pounds of household items can be delivered next-day for a flat fee. Target charges $2.99 for this service, and it waives that fee for REDcard holders. Amazon Prime Pantry's base fee is currently $5.99, and using that service requires a $119 annual Prime subscription. Target can undercut Amazon on price and offer much faster shipping because these Restock orders are being shipped from nearby stores.

Target is also expanding its Drive-Up service, which allows customers to place orders online and have the items loaded into their cars at a Target store. The company added Drive-Up to 250 stores in the first quarter, with plans to add an additional 300 stores in the second quarter.

All of these initiatives are still new, but they have the potential to turbocharge Target's online sales growth.

Making up for lost time

Before this year, Target didn't seem to have much of an online strategy. That's no longer the case. The company is making use of its more than 1,800 stores to speed up shipping times and reduce costs. Restock is particularly aggressive, and it has the potential to greatly increase Target's online sales of household products.

These initiatives are almost certainly going to hurt Target's margins, at least for a while. Shipping heavy boxes full of pasta sauce and cleaning supplies next-day, even from nearby stores, isn't cheap. Neither is offering free two-day shipping for REDcard holders without minimums. Competing with Amazon on price and convenience without the luxury of annual membership fees is expensive.

But it's not impossible. Target is taking the long view with its e-commerce strategy, sacrificing margins today as it makes its online offerings competitive. Investors should be happy about that.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Timothy Green has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon. The Motley Fool has a disclosure policy.