티스토리 뷰
https://doc.babylonjs.com/features/es6_support
npm install webpack webpack-cli webpack-dev-server --save-dev
npm install --save-dev @babylonjs/core
npm install --save-dev @babylonjs/materials
npm install typescript ts-loader --save-dev
webpack.config.js
const path = require("path");
module.exports = {
entry: "./src/index.ts",
output: {
filename: "main.js",
path: path.resolve(__dirname, "dist")
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader"
}
]
},
devServer: {
contentBase: "./dist",
port: 3000,
historyApiFallback: {
index: "index.html"
}
}
};
tsconfig.json
{
"include": [
"./src/**/*.ts" //which kind of files to compile
],
"exclude": [
"./node_modules", //which files or directories to ignore
"./src/**/*.spec.ts"
],
"compilerOptions": {
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"sourceMap": true /* Generates corresponding '.map' file. */,
"outDir": "./dist" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
"removeComments": true /* Do not emit comments to output. */,
"strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"strictNullChecks": true /* Enable strict null checks. */,
"noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
}
}
'Web > npm' 카테고리의 다른 글
github에 앵귤러 업로드하기 (0) | 2019.04.02 |
---|---|
Error: Cannot find module 'typescript' (0) | 2019.02.18 |
Typescript 기본셋팅 (0) | 2019.01.12 |
명렁어모음 (6) | 2018.12.28 |
- Total
- Today
- Yesterday
- C11
- HTML
- Visual Studio 2017
- #비주얼스튜디오
- 도매인 가격비교
- .editorconfig
- fyling fly
- gettext
- CSS
- C++
- scanf()
- flying bee
- stdarg.h
- wxWidgets
- Generic()
- dropdown list
- 오류
- scss slider
- responsive slider
- xgettext
- C
- JS
- CSS 슬라이더
- slider
- SCSS @for
- _Generic()
- #C
- 1000 자리 계산기
- 도메인 가격비교
- css slider
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |