Skip to content

Correct usage with webpack #144

Description

@matthias62

When using with webpack I get the warning:

WARNING in .//angular-localforage//localforage/dist/localforage.js
Critical dependencies:
7:484-491 This seems to be a pre-built javascript file. Though this is possible,
it's not recommended. Try to require the original source to get better results.

I learnt, that this is not critical but it produces side effects when using with angular fullstack generator. The automatic reload of the application on code changes hangs when that warning occurs and I have to do a manual reload of the application.

To get rid of the warning I had to webpack's noParse property with the following path syntax (because I am on Windows):

    noParse: /[\/\\]node_modules[\/\\]localforage[\/\\]dist[\/\\]localforage\.js$/,

After that the warning disappears and the auto reload on code changes works but I don't like the Windows dependent path which will probably not work when building on Linux.

What is the recommended way to use angular-localForage with webpack to avoid such platform specific issues?

Best regards
Matthias

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions