Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Cannot able to load .xlf file with systemjs-text-plugin.js #50

Open

Description

@divyameher

I'm not able to load .xlf file with systemjs-text-plugin.js whereas it works fine for js,html files

Activity

  1. aluanhaddad commented on Sep 25, 2017

    @aluanhaddad

    I cannot reproduce this, it loads such files just fine

    Here is what I used:

    // src/app.js
    import xlf from './xml-localisation-interchange-file-format.xlf!text';
    console.log(xlf);

    It also works fine via meta config:

    SystemJS.config({
      "meta": {
        "*.xlf": {
          "loader": "text"
        }
      }
    });

    and then in app.js

    import xlf from './xml-localisation-interchange-file-format.xlf';
    console.log(xlf);

    I used the example from the Wikipedia article on the XLIFF XML dialect as a reference document.

  2. divyameher commented on Sep 26, 2017

    @divyameher
    Author

    @aluanhaddad If I use similar as above I'm getting Errors - cannot find module './xml-localisation-interchange-file-format.xlf' or cannot find module './xml-localisation-interchange-file-format.xlf!text'

    image

  3. divyameher commented on Sep 26, 2017

    @divyameher
    Author

    I have found the rootcause for this problem System.import(variable) is not able to load file whereas System.import("./i18n/messages.es.xlf!text")(Hardcoding file name) works perfect. But what is the reason for System.import not accepting an expression or a variable?

  4. aluanhaddad commented on Oct 4, 2017

    @aluanhaddad

    @divyameher I do not understand the screenshot. TypeScript compile time errors are a separate and resolved matter (use declare module "*.xlf";).

    Also, you can pass an expression to System.import. Can you add a sample of code that demonstrates the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions