Last active
May 9, 2017 09:24
-
-
Save skytreader/a21fcfb111cd96d8b63cb11b39ae7c81 to your computer and use it in GitHub Desktop.
Minimal Webpack Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Do assume there exists a lodash.js file in the same directory level./// <reference path="./model.ts" /> | |
import "./lodash.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Skrd{ | |
export module objects{ | |
export class Person { | |
constructor( | |
firstname: string, | |
lastname: string | |
) {} | |
} | |
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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"); | |
} | |
} | |
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"preserveConstEnums": true, | |
"sourceMap": true, | |
"outDir": "build", | |
"rootDir": "./", | |
"target": "ES5" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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