Skip to content

Commit

Permalink
feat: SSR compatibility TG-10 (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar authored Sep 7, 2021
1 parent 60d32e2 commit 1cb878d
Show file tree
Hide file tree
Showing 89 changed files with 105,373 additions and 50,899 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ packages/**/dist
testapps/*/dist
testapps/ngx/*/dist
**/.DS_Store
testapps/gatsby/.env*
testapps/gatsby.cache
testapps/gatsby/public
2 changes: 1 addition & 1 deletion e2e/cypress/integration/core/base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ context('Base test', () => {

it('is working for all bundles', () => {
const xpath = cy.xpath("//*[contains(text(), 'This is test text!')]");
xpath.should('have.length', 6);
xpath.should('have.length', 4);
});
});
1 change: 1 addition & 0 deletions gradle/e2e.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ task waitForRunningContainer(type: Task, group: "e2e") {
BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream()))
String s = null
while ((s = stdInput.readLine()) != null) {
println(s)
if (s.contains("Tomcat started on port(s):")) {
return
}
Expand Down
7 changes: 7 additions & 0 deletions packages/core/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./dist/tolgee.cjs.min.js');
} else {
module.exports = require('./dist/tolgee.cjs.js');
}
Loading

0 comments on commit 1cb878d

Please sign in to comment.