Skip to content

Instantly share code, notes, and snippets.

@gnosis23
Created July 7, 2019 13:54
Show Gist options
  • Save gnosis23/6915c3462f8d1e06eed60823fb1daed7 to your computer and use it in GitHub Desktop.
Save gnosis23/6915c3462f8d1e06eed60823fb1daed7 to your computer and use it in GitHub Desktop.
rxjs starter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body { background: #ececec; }
ul { list-style-type: none; padding: 20px;}
li { padding: 20px; background: white; margin-bottom: 5px;}
</style>
</head>
<body>
<ul id="output">
</ul>
<script src="/bundle.js"></script>
</body>
</html>
{
"name": "rxjs-example",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "webpack-dev-server --mode development"
},
"dependencies": {
"rxjs": "5",
"ts-loader": "^6.0.4",
"typescript": "^3.5.2",
"webpack": "^4.35.2",
"webpack-dev-server": "^3.7.2"
},
"devDependencies": {
"webpack-cli": "^3.3.5"
}
}
{
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"moduleResolution": "node",
"sourceMap": true,
"target": "es6",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
const path = require('path');
module.exports = {
entry: './src/code.ts',
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: ['.ts', '.js', '.tsx']
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment