Skip to content

Instantly share code, notes, and snippets.

@skytreader
Last active May 9, 2017 09:24
Show Gist options
  • Save skytreader/a21fcfb111cd96d8b63cb11b39ae7c81 to your computer and use it in GitHub Desktop.
Save skytreader/a21fcfb111cd96d8b63cb11b39ae7c81 to your computer and use it in GitHub Desktop.
Minimal Webpack Test
// Do assume there exists a lodash.js file in the same directory level./// <reference path="./model.ts" />
import "./lodash.js";
module Skrd{
export module objects{
export class Person {
constructor(
firstname: string,
lastname: string
) {}
}
}}
/// <reference path="./model.ts" />
import "./model.ts";
module Skytreader{
export module test{
class Foo{
constructor(
public person: Skrd.objects.Person
) {}
public test(){
console.log("hello");
}
}
}}
{
"compilerOptions": {
"preserveConstEnums": true,
"sourceMap": true,
"outDir": "build",
"rootDir": "./",
"target": "ES5"
}
}
module.exports = {
entry:{
"ltest": "./ltest.ts",
"test": "./test.ts"
},
output: {
filename: "[name].js",
path: __dirname
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/,
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment