Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What am i doing wrong? #295

Open
DrogoNevets opened this issue Nov 28, 2018 · 0 comments
Open

What am i doing wrong? #295

DrogoNevets opened this issue Nov 28, 2018 · 0 comments

Comments

@DrogoNevets
Copy link

This is probably someting really simple

I have a simple webpack + ts setup.

my webpack.config-test.js looks thusly

var nodeExternals = require('webpack-node-externals');

console.log(__dirname);

module.exports = {
    target: 'node', // webpack should compile node compatible code
    externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
    module: {
        rules: [
            {
                test: /\.ts?$/,
                use: 'babel-loader',
                exclude: /node_modules/
            },
        ]
    }
};

However when I run my test, I have the first line to import the module I want to test
import User from '../../src/models/User';

but it cannot find the module, the path is 100% correct, what am I doing wrong?

Help me obi wan kenobi.......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant