bundle css and firebase

This commit is contained in:
Ayo 2019-12-10 12:27:06 +08:00
parent 20f1347127
commit 9a34995b86
8 changed files with 1184 additions and 17 deletions

View file

@ -33,10 +33,6 @@
<button onclick="updateLeaders()">Update Leaders</button>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-firestore.js"></script>
<script type=module src="ayo.js"></script>
</body>

View file

@ -22,8 +22,6 @@
gtag('config', 'UA-113797180-1');
</script>
<link rel="stylesheet" href="/main.css" />
<link rel="stylesheet" href="/src/services/loading/loading.css" />
<link rel="shortcut icon" type="image/png" href="/favicon.ico">
</head>
<body>
@ -40,10 +38,6 @@
</div>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-firestore.js"></script>
<script type="module" src="/dist/main.js"></script>
</body>
</html>

1171
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,10 +12,13 @@
"author": "",
"license": "ISC",
"dependencies": {
"firebase": "^7.5.2",
"webpack": "^4.41.2"
},
"devDependencies": {
"css-loader": "^3.3.0",
"http-server": "^0.12.0",
"style-loader": "^1.0.1",
"webpack-cli": "^3.3.10"
}
}

View file

@ -5,9 +5,11 @@
Blog: FullHacker.com
Live: games.fullhacker.com/minesweeper
*/
import './index.css';
import './services/loading/loading.css';
import { Minesweeper } from './minesweeper.js';
/** start the game **/
const myMinesweeper = new Minesweeper();
myMinesweeper.initialize();
console.log('hey');

View file

@ -1,3 +1,6 @@
import firebase from 'firebase/app';
import 'firebase/firestore';
export class DatabaseService {
constructor() {
// Your web app's Firebase configuration

10
webpack.config.js Normal file
View file

@ -0,0 +1,10 @@
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
use:['style-loader','css-loader']
},
],
},
};