webpack не видит файлы

371
23 марта 2017, 21:26

tsconfig:

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "noImplicitAny": true,
        "declaration": true
    },
    "files": [
        "sample2-inject/app.ts"
    ],
    "exclude": [
    ]
}

webpack.config.js:

var path = require('path');
module.exports = {
    entry: path.resolve("./sample2-inject/app.ts"),
    output: {
        path: path.resolve("./dist"),
        filename: "bundle.js",
        library: "home"
    },
    resolve: {
        extensions: [".webpack.js", ".web.js", ".ts", ".js"]
    },
    module: {
        loaders: [
            {loader: "ts-loader"}
        ]
    },
    watch: true,
    devtool: "eval"
};

app.ts

import "es6-shim";
import "reflect-metadata";
import {Container} from "typedi";

Пишет ошибки:

[0] ./~/typedi/index.js 528 bytes {0} [built] [failed] [1 error]
[1] ./~/es6-shim/es6-shim.js 533 bytes {0} [built] [failed] [1 error] [2] ./~/reflect-metadata/Reflect.js 540 bytes {0} [built] [failed] [1 error]

ERROR in ./~/reflect-metadata/Reflect.js Module build failed: Error: Could not find file: '/home/sesmanovich/www/JQueryPlugins/node_modules/reflect-metadata/Reflect.js'. at getValidSourceFile (/usr/local/lib/node_modules/typescript/lib/typescript.js:81080:23) at Object.getEmitOutput (/usr/local/lib/node_modules/typescript/lib/typescript.js:81446:30) at getEmit (/home/sesmanovich/www/JQueryPlugins/node_modules/ts-loader/dist/index.js:99:43) at Object.loader (/home/sesmanovich/www/JQueryPlugins/node_modules/ts-loader/dist/index.js:27:11) @ ./sample2-inject/app.ts 4:0-27

READ ALSO
Проблема с setTimeout, нужно чтобы меду циклами while была пауза

Проблема с setTimeout, нужно чтобы меду циклами while была пауза

Нужно рекурсивно вызывать функцию через SetTimeout 4 раза, а не пихать while в Star, который вызывается через 1 секунду, получается каждый раз через...

151
Вытащить цифры из строки (Javascript)

Вытащить цифры из строки (Javascript)

Почему не удается вытащить цифры из строки ?

253