Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsxから読み込んでる画像をWebpackで管理する #14

Merged
merged 2 commits into from
Jan 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
12 changes: 12 additions & 0 deletions app/javascript/images/image.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module '*.jpg'
declare module '*.jpeg'
declare module '*.png'
declare module '*.gif'
declare module '*.tiff'
declare module '*.ico'
declare module '*.svg'
declare module '*.eot'
declare module '*.otf'
declare module '*.ttf'
declare module '*.woff'
declare module '*.woff2'
File renamed without changes
3 changes: 2 additions & 1 deletion app/javascript/packs/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import GitHub from "images/github.svg";
import * as React from "react";

export const Footer: React.StatelessComponent<{}> = () => {
Expand All @@ -11,7 +12,7 @@ export const Footer: React.StatelessComponent<{}> = () => {
</p>
<div className="github">
<a href="https://github.com/tynmarket/coffeehub" target="_blank">
<img src="/images/github.svg" />
<img src={GitHub} />
</a>
</div>
<div className="copyright-flaticon">
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/packs/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Icon from "images/icon.svg";
import * as React from "react";

export const Header: React.StatelessComponent<{}> = () => {
return (
<header className="header">
<a className="header-logo" href="/">
<img src="/images/icon.svg" />
<img src={Icon} />
<span className="header-title">
Coffee Hub
</span>
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/packs/components/Pickup.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Mui from "images/mui.png";
import * as React from "react";

export const Pickup: React.StatelessComponent<{}> = () => {
return (
<section className="pickup">
<a href="http://www.mui-motosumi.co.jp" target="_blank">
<img className="pickup-image" src="/images/mui.png" />
<img className="pickup-image" src={Mui} />
<span className="pickup-note">
ピックアップ
</span>
Expand Down