SlideShare ist ein Scribd-Unternehmen logo
1 von 59
Downloaden Sie, um offline zu lesen



もりしん
#スマブラSP #人工知能
#React #ドラゴンボール
#PWA #スタートアップ
#仮想通貨 #Python





$ mkdir work

work
$ yarn init [-y]


work
package.json
$ yarn add react react-dom






work
node_modules
package.json
yarn.lock
$ mkdir public

work
node_modules
public
package.json
yarn.lock
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Netadashi</title>
</head>
<body>
<article id="root">Hello</article>
</body>
</html>
work
node_modules
public
index.html
package.json
yarn.lock
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Netadashi</title>
</head>
<body>
<article id="root">Hello</article>
</body>
</html>
work
node_modules
public
index.html
package.json
yarn.lock
$ mkdir src

work
node_modules
public
index.html
package.json
yarn.lock
src
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
<h1>World</h1>,
document.querySelector('#root')
);
work
node_modules
public
index.html
package.json
yarn.lock
src
index.jsx
$ yarn add webpack webpack-cli






work
node_modules
public
index.html
package.json
yarn.lock
src
index.jsx
const path = require('path');
module.exports = {
entry: path.join(__dirname, 'src', 'index.jsx'),
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'public', 'assets', 'js')
}
};
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
$ webpack [--mode development]
ERROR in C:/Netadashi/work/src/index.jsx 5:2
Module parse failed: Unexpected token (5:2)
You may need an appropriate loader to handle this file
type.
|
| ReactDOM.render(
> <h1>World</h1>,
| document.querySelector('#root')
| );
error An unexpected error occurred: "Command failed.…
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
$ yarn add @babel/core
@babel/preset-react babel-loader








work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
const path = require('path');
module.exports = {
entry: path.join(__dirname, 'src', 'index.jsx'),
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'public', 'assets', 'js')
},
module: {
rules: [
{
test: /¥.js[x]?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
}
};
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
$ yarn add webpack-dev-server



work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
...
module: {
rules: [
{
test: /¥.js[x]?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
},
devServer: {
contentBase: path.join(__dirname, 'public')
}
};
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
...
"dependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14"
},
"scripts": {
"dev": "webpack --mode development",
"start": "webpack-dev-server --mode development"
}
}
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
$ yarn [run] dev [--watch]

work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Netadashi</title>
</head>
<body>
<article id="root">Hello</article>
<script src="/assets/js/bundle.js"></script>
</body>
</html>
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
$ yarn [run] start



$ yarn [run] start



Congratulations…?
$ yarn add @material-ui/core

work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
import React from 'react';
import ReactDOM from 'react-dom';
const App = () => {
return (
<>
<h1>World</h1>
</>
);
};
ReactDOM.render(
<App />,
document.querySelector('#root')
);
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Typography } from '@material-ui/core';
const App = () => {
return (
<>
<Typography variant="h6">Neta</Typography>
<Button variant="contained" color="primary">Dashi</Button>
</>
);
};
ReactDOM.render(
<App />,
document.querySelector('#root')
);
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
$ mkdir css

work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
body {
margin: 0;
}
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
master.css
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="/assets/css/master.css">
<title>Netadashi</title>
</head>
<body>
<article id="root">Loading...</article>
<script src="/assets/js/bundle.js"></script>
</body>
</html>
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
master.css
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="/assets/css/master.css">
<title>Netadashi</title>
</head>
<body>
<article id="root">Loading...</article>
<script src="/assets/js/bundle.js"></script>
</body>
</html>
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
master.css
...
const App = () => {
return (
<>
<Typography variant="h6">Neta</Typography>
<section style={{
background: 'url(https://source.unsplash.com/random/500x500)
center / cover',
height: '80vw',
width: '80vw'
}} />
<Button
variant="contained"
color="primary"
onClick={() => { location.reload(); }}
>
Dashi
</Button>
</>
);
};
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
master.css
...
const App = () => {
return (
<>
<Typography variant="h6">Neta</Typography>
<section style={{
background: 'url(https://source.unsplash.com/random/500x500)
center / cover',
height: '80vw',
width: '80vw'
}} />
<Button
variant="contained"
color="primary"
onClick={() => { location.reload(); }}
>
Dashi
</Button>
</>
);
};
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
master.css
import React from 'react';
import ReactDOM from 'react-dom';
import { AppBar, Button, Toolbar, Typography } from '@material-ui/core';
const App = () => {
return (
<>
<AppBar position="static">
<Toolbar>
<Typography variant="h6" color="inherit">Neta</Typography>
</Toolbar>
</AppBar>
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
master.css
import React from 'react';
import ReactDOM from 'react-dom';
import { AppBar, Button, Toolbar, Typography } from '@material-ui/core';
const App = () => {
return (
<>
<AppBar position="static">
<Toolbar>
<Typography variant="h6" color="inherit">Neta</Typography>
</Toolbar>
</AppBar>
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
bundle.js
css
master.css
$ mkdir components



work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
import React from 'react';
import { AppBar, Toolbar, Typography } from '@material-ui/core';
const Header = () => {
return (
<>
<AppBar position="static">
<Toolbar>
<Typography variant="h6" color="inherit">Neta</Typography>
</Toolbar>
</AppBar>
</>
);
};
export default Header;
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
...
import { Button } from '@material-ui/core';
import Header from './components/Header.jsx';
const App = () => {
return (
<>
<Header />
<section style={{
background: 'url(https:// source.unsplash.com/random/500x500)
center / cover',
height: '80vw',
width: '80vw'
}} />
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
...
import { Button, Grid } from '@material-ui/core';
import Header from './components/Header.jsx';
const App = () => {
return (
<>
<Header />
<Grid container alignItems="center" justify="center">
<Grid style={{ padding: 24 }}>
<section style={{
background: 'url(https://source.unsplash.com/random/500x500)
center / cover',
height: '80vw',
width: '80vw',
border: 'solid 3vw #fff',
boxShadow: '0 1vw 3vw #999'
}} />
</Grid>
</Grid>
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
...
import { Button, Grid } from '@material-ui/core';
import Header from './components/Header.jsx';
const App = () => {
return (
<>
<Header />
<Grid container alignItems="center" justify="center">
<Grid style={{ padding: 24 }}>
<section style={{
background: 'url(https://source.unsplash.com/random/500x500)
center / cover',
height: '80vw',
width: '80vw',
border: 'solid 3vw #fff',
boxShadow: '0 1vw 3vw #999'
}} />
</Grid>
</Grid>
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
import React from 'react';
import { AppBar, Toolbar, Typography } from '@material-ui/core';
const Header = () => {
return (
<>
<AppBar position="static">
<Toolbar>
<Typography variant="h6" color="inherit">Neta/Dash</Typography>
</Toolbar>
</AppBar>
</>
);
};
export default Header;
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
...
import { Fab, Grid, Icon } from '@material-ui/core';
import Header from './components/Header.jsx';
const App = () => {
return (
<>
<Header />
<Grid container alignItems="center" justify="center">
...
</Grid>
<section style={{
position: 'fixed',
right: '6vw',
bottom: '6vw'
}}>
<Fab color="secondary" onClick={() => { location.reload(); }}>
<Icon fontSize="large">directions_run</Icon>
</Fab>
</section>
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
...
import { Fab, Grid, Icon } from '@material-ui/core';
import Header from './components/Header.jsx';
const App = () => {
return (
<>
<Header />
<Grid container alignItems="center" justify="center">
...
</Grid>
<section style={{
position: 'fixed',
right: '6vw',
bottom: '6vw'
}}>
<Fab color="secondary" onClick={() => { location.reload(); }}>
<Icon fontSize="large">directions_run</Icon>
</Fab>
</section>
...
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
$ yarn global add now



work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
{
"name": "work",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-react": "^7.0.0",
"@material-ui/core": "^3.9.0",
"babel-loader": "^8.0.5",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14"
},
"scripts": {
"dev": "webpack --mode development",
"build": "webpack --mode production",
"start": "webpack-dev-server --mode development"
}
}
work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
$ yarn [run] build

work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx
$ now

work
node_modules
public
index.html
package.json
webpack.config.js
src
index.jsx
yarn.lock
assets
js
css
components
Header.jsx












Build a React PWA with Material UI and Webpack

Weitere ähnliche Inhalte

Was ist angesagt?

Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and RenderingStoyan Stefanov
 
How to make a WordPress theme
How to make a WordPress themeHow to make a WordPress theme
How to make a WordPress themeHardeep Asrani
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on labNAVER D2
 
Drupal as a web framework
Drupal as a web frameworkDrupal as a web framework
Drupal as a web frameworkAdam Kalsey
 
True Dreams Furniture
True Dreams FurnitureTrue Dreams Furniture
True Dreams FurnitureSimranGaur3
 
Make More Money With Advanced Custom Fields - WordCampYYC 2015
Make More Money With Advanced Custom Fields - WordCampYYC 2015Make More Money With Advanced Custom Fields - WordCampYYC 2015
Make More Money With Advanced Custom Fields - WordCampYYC 2015buildstudio
 
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of codeSummit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of codeAngel Borroy López
 
2014 database - course 3 - PHP and MySQL
2014 database - course 3 - PHP and MySQL2014 database - course 3 - PHP and MySQL
2014 database - course 3 - PHP and MySQLHung-yu Lin
 
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...IT Event
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developersDream Production AG
 

Was ist angesagt? (20)

Progressive Downloads and Rendering
Progressive Downloads and RenderingProgressive Downloads and Rendering
Progressive Downloads and Rendering
 
How to make a WordPress theme
How to make a WordPress themeHow to make a WordPress theme
How to make a WordPress theme
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
Drupal as a web framework
Drupal as a web frameworkDrupal as a web framework
Drupal as a web framework
 
Presentation
PresentationPresentation
Presentation
 
Jsp
JspJsp
Jsp
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
 
The Devil and HTML5
The Devil and HTML5The Devil and HTML5
The Devil and HTML5
 
True Dreams Furniture
True Dreams FurnitureTrue Dreams Furniture
True Dreams Furniture
 
Make More Money With Advanced Custom Fields - WordCampYYC 2015
Make More Money With Advanced Custom Fields - WordCampYYC 2015Make More Money With Advanced Custom Fields - WordCampYYC 2015
Make More Money With Advanced Custom Fields - WordCampYYC 2015
 
Grails resources
Grails resourcesGrails resources
Grails resources
 
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of codeSummit2014 topic 0066 - 10 enhancements that require 10 lines of code
Summit2014 topic 0066 - 10 enhancements that require 10 lines of code
 
2014 database - course 3 - PHP and MySQL
2014 database - course 3 - PHP and MySQL2014 database - course 3 - PHP and MySQL
2014 database - course 3 - PHP and MySQL
 
Zend
ZendZend
Zend
 
Jsp Notes
Jsp NotesJsp Notes
Jsp Notes
 
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
 
Django
DjangoDjango
Django
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developers
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 

Ähnlich wie Build a React PWA with Material UI and Webpack

Enjoy the vue.js
Enjoy the vue.jsEnjoy the vue.js
Enjoy the vue.jsTechExeter
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Joao Lucas Santana
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseAaron Silverman
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoRob Bontekoe
 
Resource registries plone conf 2014
Resource registries plone conf 2014Resource registries plone conf 2014
Resource registries plone conf 2014Ramon Navarro
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014Rob Gietema
 
Responsive Design: Mehr als CSS
Responsive Design: Mehr als CSSResponsive Design: Mehr als CSS
Responsive Design: Mehr als CSSWalter Ebert
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2James Pearce
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012crokitta
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By PalashPalashBajpai
 
Desenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery MobileDesenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery MobilePablo Garrido
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources frameworkmarcplmer
 
JavaServer Pages
JavaServer Pages JavaServer Pages
JavaServer Pages profbnk
 

Ähnlich wie Build a React PWA with Material UI and Webpack (20)

Enjoy the vue.js
Enjoy the vue.jsEnjoy the vue.js
Enjoy the vue.js
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
 
WebAPI Odata Knockout
WebAPI Odata KnockoutWebAPI Odata Knockout
WebAPI Odata Knockout
 
Node.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash CourseNode.js & Twitter Bootstrap Crash Course
Node.js & Twitter Bootstrap Crash Course
 
smoke1272528461
smoke1272528461smoke1272528461
smoke1272528461
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Resource registries plone conf 2014
Resource registries plone conf 2014Resource registries plone conf 2014
Resource registries plone conf 2014
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014
 
Responsive Design: Mehr als CSS
Responsive Design: Mehr als CSSResponsive Design: Mehr als CSS
Responsive Design: Mehr als CSS
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Frfrfrf
FrfrfrfFrfrfrf
Frfrfrf
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By Palash
 
Desenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery MobileDesenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery Mobile
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources framework
 
Practica n° 7
Practica n° 7Practica n° 7
Practica n° 7
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
JavaServer Pages
JavaServer Pages JavaServer Pages
JavaServer Pages
 

Mehr von Makoto Mori

20240227 完全に理解した LT 「mise いいよ mise」 / morishin
20240227 完全に理解した LT 「mise いいよ mise」 / morishin20240227 完全に理解した LT 「mise いいよ mise」 / morishin
20240227 完全に理解した LT 「mise いいよ mise」 / morishinMakoto Mori
 
エンジニアの気持ちを完全に理解してくれている Cypress Cloud
エンジニアの気持ちを完全に理解してくれている Cypress Cloudエンジニアの気持ちを完全に理解してくれている Cypress Cloud
エンジニアの気持ちを完全に理解してくれている Cypress CloudMakoto Mori
 
20230228 React Tech Night TOKYO #3
20230228 React Tech Night TOKYO #320230228 React Tech Night TOKYO #3
20230228 React Tech Night TOKYO #3Makoto Mori
 
20190623_SPAJAM2019_Sendai
20190623_SPAJAM2019_Sendai20190623_SPAJAM2019_Sendai
20190623_SPAJAM2019_SendaiMakoto Mori
 
20180908_OSSDevCamp2018
20180908_OSSDevCamp201820180908_OSSDevCamp2018
20180908_OSSDevCamp2018Makoto Mori
 
20170417_Netadashi_KubeCon
20170417_Netadashi_KubeCon20170417_Netadashi_KubeCon
20170417_Netadashi_KubeConMakoto Mori
 
20171004_CEATEC2017_DesignThinking
20171004_CEATEC2017_DesignThinking20171004_CEATEC2017_DesignThinking
20171004_CEATEC2017_DesignThinkingMakoto Mori
 

Mehr von Makoto Mori (7)

20240227 完全に理解した LT 「mise いいよ mise」 / morishin
20240227 完全に理解した LT 「mise いいよ mise」 / morishin20240227 完全に理解した LT 「mise いいよ mise」 / morishin
20240227 完全に理解した LT 「mise いいよ mise」 / morishin
 
エンジニアの気持ちを完全に理解してくれている Cypress Cloud
エンジニアの気持ちを完全に理解してくれている Cypress Cloudエンジニアの気持ちを完全に理解してくれている Cypress Cloud
エンジニアの気持ちを完全に理解してくれている Cypress Cloud
 
20230228 React Tech Night TOKYO #3
20230228 React Tech Night TOKYO #320230228 React Tech Night TOKYO #3
20230228 React Tech Night TOKYO #3
 
20190623_SPAJAM2019_Sendai
20190623_SPAJAM2019_Sendai20190623_SPAJAM2019_Sendai
20190623_SPAJAM2019_Sendai
 
20180908_OSSDevCamp2018
20180908_OSSDevCamp201820180908_OSSDevCamp2018
20180908_OSSDevCamp2018
 
20170417_Netadashi_KubeCon
20170417_Netadashi_KubeCon20170417_Netadashi_KubeCon
20170417_Netadashi_KubeCon
 
20171004_CEATEC2017_DesignThinking
20171004_CEATEC2017_DesignThinking20171004_CEATEC2017_DesignThinking
20171004_CEATEC2017_DesignThinking
 

Kürzlich hochgeladen

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 

Kürzlich hochgeladen (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 

Build a React PWA with Material UI and Webpack

  • 1.
  • 4.
  • 5.
  • 8. $ yarn init [-y]   work package.json
  • 9. $ yarn add react react-dom       work node_modules package.json yarn.lock
  • 11. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Netadashi</title> </head> <body> <article id="root">Hello</article> </body> </html> work node_modules public index.html package.json yarn.lock
  • 12. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Netadashi</title> </head> <body> <article id="root">Hello</article> </body> </html> work node_modules public index.html package.json yarn.lock
  • 14. import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( <h1>World</h1>, document.querySelector('#root') ); work node_modules public index.html package.json yarn.lock src index.jsx
  • 15. $ yarn add webpack webpack-cli       work node_modules public index.html package.json yarn.lock src index.jsx
  • 16. const path = require('path'); module.exports = { entry: path.join(__dirname, 'src', 'index.jsx'), output: { filename: 'bundle.js', path: path.join(__dirname, 'public', 'assets', 'js') } }; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
  • 17. $ webpack [--mode development] ERROR in C:/Netadashi/work/src/index.jsx 5:2 Module parse failed: Unexpected token (5:2) You may need an appropriate loader to handle this file type. | | ReactDOM.render( > <h1>World</h1>, | document.querySelector('#root') | ); error An unexpected error occurred: "Command failed.… work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
  • 18. $ yarn add @babel/core @babel/preset-react babel-loader         work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
  • 19. const path = require('path'); module.exports = { entry: path.join(__dirname, 'src', 'index.jsx'), output: { filename: 'bundle.js', path: path.join(__dirname, 'public', 'assets', 'js') }, module: { rules: [ { test: /¥.js[x]?$/, exclude: /node_modules/, use: { loader: 'babel-loader' } } ] } }; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
  • 20. $ yarn add webpack-dev-server    work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
  • 21. ... module: { rules: [ { test: /¥.js[x]?$/, exclude: /node_modules/, use: { loader: 'babel-loader' } } ] }, devServer: { contentBase: path.join(__dirname, 'public') } }; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
  • 22. ... "dependencies": { "@babel/core": "^7.2.2", "@babel/preset-env": "^7.2.3", "@babel/preset-react": "^7.0.0", "babel-loader": "^8.0.5", "react": "^16.7.0", "react-dom": "^16.7.0", "webpack": "^4.28.4", "webpack-cli": "^3.2.1", "webpack-dev-server": "^3.1.14" }, "scripts": { "dev": "webpack --mode development", "start": "webpack-dev-server --mode development" } } work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock
  • 23. $ yarn [run] dev [--watch]  work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
  • 24. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Netadashi</title> </head> <body> <article id="root">Hello</article> <script src="/assets/js/bundle.js"></script> </body> </html> work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
  • 25. $ yarn [run] start   
  • 26. $ yarn [run] start   
  • 28.
  • 29. $ yarn add @material-ui/core  work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
  • 30. import React from 'react'; import ReactDOM from 'react-dom'; const App = () => { return ( <> <h1>World</h1> </> ); }; ReactDOM.render( <App />, document.querySelector('#root') ); work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
  • 31. import React from 'react'; import ReactDOM from 'react-dom'; import { Button, Typography } from '@material-ui/core'; const App = () => { return ( <> <Typography variant="h6">Neta</Typography> <Button variant="contained" color="primary">Dashi</Button> </> ); }; ReactDOM.render( <App />, document.querySelector('#root') ); work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js
  • 34. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="/assets/css/master.css"> <title>Netadashi</title> </head> <body> <article id="root">Loading...</article> <script src="/assets/js/bundle.js"></script> </body> </html> work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
  • 35. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="/assets/css/master.css"> <title>Netadashi</title> </head> <body> <article id="root">Loading...</article> <script src="/assets/js/bundle.js"></script> </body> </html> work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. ... const App = () => { return ( <> <Typography variant="h6">Neta</Typography> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw' }} /> <Button variant="contained" color="primary" onClick={() => { location.reload(); }} > Dashi </Button> </> ); }; ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
  • 41. ... const App = () => { return ( <> <Typography variant="h6">Neta</Typography> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw' }} /> <Button variant="contained" color="primary" onClick={() => { location.reload(); }} > Dashi </Button> </> ); }; ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
  • 42. import React from 'react'; import ReactDOM from 'react-dom'; import { AppBar, Button, Toolbar, Typography } from '@material-ui/core'; const App = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta</Typography> </Toolbar> </AppBar> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
  • 43. import React from 'react'; import ReactDOM from 'react-dom'; import { AppBar, Button, Toolbar, Typography } from '@material-ui/core'; const App = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta</Typography> </Toolbar> </AppBar> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js bundle.js css master.css
  • 45. import React from 'react'; import { AppBar, Toolbar, Typography } from '@material-ui/core'; const Header = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta</Typography> </Toolbar> </AppBar> </> ); }; export default Header; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 46. ... import { Button } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <section style={{ background: 'url(https:// source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw' }} /> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 47. ... import { Button, Grid } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> <Grid style={{ padding: 24 }}> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw', border: 'solid 3vw #fff', boxShadow: '0 1vw 3vw #999' }} /> </Grid> </Grid> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 48. ... import { Button, Grid } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> <Grid style={{ padding: 24 }}> <section style={{ background: 'url(https://source.unsplash.com/random/500x500) center / cover', height: '80vw', width: '80vw', border: 'solid 3vw #fff', boxShadow: '0 1vw 3vw #999' }} /> </Grid> </Grid> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 49. import React from 'react'; import { AppBar, Toolbar, Typography } from '@material-ui/core'; const Header = () => { return ( <> <AppBar position="static"> <Toolbar> <Typography variant="h6" color="inherit">Neta/Dash</Typography> </Toolbar> </AppBar> </> ); }; export default Header; work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 50. ... import { Fab, Grid, Icon } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> ... </Grid> <section style={{ position: 'fixed', right: '6vw', bottom: '6vw' }}> <Fab color="secondary" onClick={() => { location.reload(); }}> <Icon fontSize="large">directions_run</Icon> </Fab> </section> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 51. ... import { Fab, Grid, Icon } from '@material-ui/core'; import Header from './components/Header.jsx'; const App = () => { return ( <> <Header /> <Grid container alignItems="center" justify="center"> ... </Grid> <section style={{ position: 'fixed', right: '6vw', bottom: '6vw' }}> <Fab color="secondary" onClick={() => { location.reload(); }}> <Icon fontSize="large">directions_run</Icon> </Fab> </section> ... work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 52. $ yarn global add now    work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 53. { "name": "work", "version": "1.0.0", "main": "index.js", "license": "MIT", "dependencies": { "@babel/core": "^7.2.2", "@babel/preset-react": "^7.0.0", "@material-ui/core": "^3.9.0", "babel-loader": "^8.0.5", "react": "^16.7.0", "react-dom": "^16.7.0", "webpack": "^4.28.4", "webpack-cli": "^3.2.1", "webpack-dev-server": "^3.1.14" }, "scripts": { "dev": "webpack --mode development", "build": "webpack --mode production", "start": "webpack-dev-server --mode development" } } work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 54. $ yarn [run] build  work node_modules public index.html package.json webpack.config.js src index.jsx yarn.lock assets js css components Header.jsx
  • 56.