FredKSchott / create-snowpack-app

The all-in-one app template for Snowpack. [moved]

Home Page:https://www.snowpack.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@snowpack/app-template-react-typescript build broken

aaronshaf opened this issue · comments

Steps to reproduce:

npx create-snowpack-app my_app --template @snowpack/app-template-react-typescript
cd my_app
npm run build
serve -s build

Browser console:

Uncaught TypeError: React.createElement is not a function
    at index.js:8

I also experienced that bug. It looks like import * as React from '...' is not processed correctly to import React from '...'

import * as React build perfectly on @snowpack/app-scripts-react version 1.1.0. I think the new version specifically might be causing this issue.

Sorry about that, it should be import React from 'react' in the official template, but we also should support this in Snowpack. Fixed in FredKSchott/snowpack@72933b3