LoginSignup
0

More than 5 years have passed since last update.

create-react-appのbuildディレクトリをzipで共有する

Posted at

概要

create-react-appでモックアップを作った。
「zipを解凍してindex.htmlを開けばOKですよ!」と言って共有したい。

解決策

package.jsonにhomepageを追記する。

package.json
{
  "name": "hello-world",
  "version": "0.1.0",
  "private": true,
  "homepage": ".",
  "devDependencies": {
    "react-scripts": "0.7.0"
  },
  "dependencies": {
    "react": "^15.4.1",
    "react-dom": "^15.4.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

あとは普通にbuildして、zip圧縮して渡せばOK。
以上です。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0