Created
May 30, 2020 17:07
-
-
Save guillegr123/35c73736a4159272d820b19b8762b302 to your computer and use it in GitHub Desktop.
phoenix_preact-8-app.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Preact imports | |
import { h, render } from 'preact'; | |
// App component import | |
import App from './components/App'; | |
// We need to import the CSS so that webpack will load it. | |
// The MiniCssExtractPlugin is used to separate it out into | |
// its own CSS file. | |
import "../css/app.scss" | |
// webpack automatically bundles all modules in your | |
// entry points. Those entry points can be configured | |
// in "webpack.config.js". | |
// | |
// Import deps with the dep name or local files with a relative path, for example: | |
// | |
// import {Socket} from "phoenix" | |
// import socket from "./socket" | |
// | |
import "phoenix_html" | |
// Inject our App component into the DOM | |
render(<App />, document.body); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment