-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Add browser support back in #668
Comments
Hey @Toxicable, thanks for bringing this up. In Version 1.0.0 the folder structure completely changed compared to 0.6.X. So that much more manual work is needed to bring this feature back alive. Are you using real implementations (e.g. class functions) or just the types of models in your client? I'm asking because if the latter, maybe a mapped type would be a better solution? |
And sorry for the late reply |
It's all good. As for how we use them, we only use properties, we don't define any functions in our Models. We actually go a bit further than that and noop out all the Sequalize types on
This is so you don't get methods like |
I'm just wondering, that the bundler tries to bundle the models at all, since you only use them as types. Actually they should be omitted in general. // some.ts
import {User} from './models/user';
import _ from 'lodash';
const user: User = _.assign({}, {...}); should become something like: // some.js
var _ = require('lodash');
var user = _.assign({}, {...}); Nevertheless, I'm totally fine with your solution (#673). Thanks for implementing it! |
It would appear in the 1.0.0 merge the generate-browser.js script was skipped over.
This was the latest version: https://github.com/RobinBuschmann/sequelize-typescript/blob/a05f4fcaa619ab04455ca87a39dacbeb8447a2c1/generate-browser.js
Would be great to have browser support back in for 1.0.0
The text was updated successfully, but these errors were encountered: