Re: Contribute requirejs.config.paths to ModuleManager

2017-11-24 Thread Thiago H. de Paula Figueiredo
I'm wondering here whether the best approach is the one you've chosen here, usually used when you're dealing with non-AMD-module-compliant JavaScript libraries, while React is compliant. I believe you should create a JavaScriptStack with the React .js files, contribute it to the JavaScriptStackSour

RE: Contribute requirejs.config.paths to ModuleManager

2017-11-24 Thread Svein-Erik Løken
React can in theory be used in all pages (globally). It will be like a core library for me, like jquery, underscore, bootstrap, etc. In TypeScript I am using "compilerOptions": { "module": "amd". I have written a service: @Override public void appendToModulePath(JSONObject cfg) { javaScr

Re: Contribute requirejs.config.paths to ModuleManager

2017-11-24 Thread Thiago H. de Paula Figueiredo
On Fri, Nov 24, 2017 at 11:13 AM, Svein-Erik Løken wrote: Hello! Trying to use TypeScript and React with Tapestry: > > In TypeScript I need to use: import * as React from "react"; > > I would like to load react: react.min, so I have to set paths: {...} > > The configuration should be set at sta

Contribute requirejs.config.paths to ModuleManager

2017-11-24 Thread Svein-Erik Løken
Trying to use TypeScript and React with Tapestry: In TypeScript I need to use: import * as React from "react"; I would like to load react: react.min, so I have to set paths: {...} The configuration should be set at startup, but I cannot figure how to do it. I can set requirejs.config.shim, but