Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Use FuseBox instead of Parcel
Browse files Browse the repository at this point in the history
Because Parcel

- Could not serve static files
  parcel-bundler/parcel#1080
- Could not use native reload on HMR
  parcel-bundler/parcel#289
  • Loading branch information
lambdalisue committed Feb 21, 2019
1 parent d4fdaf4 commit 8a4b2d2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
14 changes: 14 additions & 0 deletions fuse.js
@@ -0,0 +1,14 @@
const { FuseBox, WebIndexPlugin } = require("fuse-box");
const fuse = FuseBox.init({
homeDir: "src",
target: "browser@es6",
output: "dist/$name.js",
plugins: [WebIndexPlugin()],
});
fuse.dev(); // launch http server
fuse
.bundle("app")
.instructions(" > index.ts")
.hmr({ reload: true })
.watch();
fuse.run();
8 changes: 0 additions & 8 deletions index.html

This file was deleted.

9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -4,14 +4,15 @@
"description": "A sandbox skeleton project for typescript in web browser.",
"main": "lib/app.js",
"scripts": {
"dev": "parcel index.html",
"build": "parcel build index.html"
"dev": "node fuse.js"
},
"author": "lambdalisue",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"parcel-bundler": "^1.11.0",
"typescript": "^3.3.3"
"fuse-box": "^3.7.1",
"terser": "^3.16.1",
"typescript": "^3.3.3",
"uglify-js": "^3.4.9"
}
}
File renamed without changes.
3 changes: 1 addition & 2 deletions tsconfig.json
Expand Up @@ -12,8 +12,7 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCaseInSwitch": true
"noImplicitReturns": true
},
"include": [
"src/**/*"
Expand Down

0 comments on commit 8a4b2d2

Please sign in to comment.