box2d.ts icon indicating copy to clipboard operation
box2d.ts copied to clipboard

[Suggestion]Use `es5` as default compile target.

Open finscn opened this issue 6 years ago • 4 comments

When use es5 , user could use the dist js file in browser more easily.

Share my tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "system",
    "strict": true,
    "strictNullChecks": false,
    "inlineSourceMap": false,
    "preserveConstEnums": true,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitUseStrict": false,
    "noUnusedLocals": true,
    "noUnusedParameters": false,
    "removeComments": true,
    "sourceMap": true,
    "inlineSources": false,
    "declaration": true,
    "outFile": "../../dist/box2d-ts.js"
  },
  "include": [
    "**/*.ts"
  ]
}

user could use box2d-ts.js with system-production.js in browser (and mobile browser) directly.

finscn avatar Jun 08 '18 04:06 finscn

Why still using systemjs build? This is not recommended for a build. Also it's not compatible with webpack.

Nek- avatar Jun 12 '18 07:06 Nek-

@Nek- do you have some suggestions ? I just want to :

  • one js file
  • could use in most browser (include some old android/ios devices)

finscn avatar Jun 12 '18 07:06 finscn

AMD does this job very well. :) See #33 for more details.

Nek- avatar Jun 12 '18 12:06 Nek-

@finscn Are the single-file rollup builds enough for this?

flyover avatar Nov 25 '19 21:11 flyover