user888734
user888734

Reputation: 3897

Webpack - export const

I'm trying out a migration from systemjs to webpack for the first time. In my app I had something like this:

import {appSettings} from "AppSettings";

Where AppSettings was just a file with a const, not actually a module:

    export const appSettings = {
        somethings: {
        }
    };

This works with systemjs, not with webpack. Anything I can do to fix that?

Upvotes: 4

Views: 3468

Answers (1)

thitemple
thitemple

Reputation: 6059

If you're trying to import one of your own modules you should use a relative path:

import {appSettings} from "./AppSettings";

Upvotes: 4

Related Questions