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

Better examples of usage #37

Open
lmj0011 opened this issue Jul 25, 2016 · 5 comments
Open

Better examples of usage #37

lmj0011 opened this issue Jul 25, 2016 · 5 comments

Comments

@lmj0011
Copy link

lmj0011 commented Jul 25, 2016

Would be helpful if there were more examples of practical use in the README.md.

@lmj0011 lmj0011 changed the title Better examples of use Better examples of usage Jul 25, 2016
@aluanhaddad
Copy link

aluanhaddad commented Jul 27, 2017

A great thing about this plug-in is that it's simple to use.

import text from './file.txt!text';
console.info(text);

Or via configuration (preferred as it abstracts the specific loader allowing you to swap it out while at the same time keeping your code cleaner)

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

and then

import text from './file.txt';
console.info(text);

This really covers most of what you'll do with the plugin.

@Bluejanis
Copy link

With the latest version 5 of systemjs this plugin does not work anymore.

@viT-1
Copy link

viT-1 commented Aug 22, 2019

Anyone knows the solution to have string from imported templates in transpiled files without rollup or webpack, only tsc/ttsc way?

@guybedford
Copy link
Member

@viT-1 just using template strings is probably the best bet at this stage since HTML modules spec will be a while yet.

@viT-1
Copy link

viT-1 commented Aug 23, 2019

Instead this I had to workaround (for vue templates) with bundling templates & ajax they into the DOM =(

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

No branches or pull requests

5 participants