@Volodymyr_Smal-Stots wrote:
There is
sign-inroute in my project and I need to compile the route like a several file/s
- app
- routes
- sign-in.js
- templates
- sign-in.hbs
I am using
babel-plugin-ember-modules-api-polyfill, because there are imports like thatimport { inject as service } from @ember/servicein thesign-inroute. The plugin transform their , for example, toEmber.ServiceAfter compilation, when I open
dist/sign-in.jsin browser I get an errorIt because there are not any entities (Service, Mixin, Component, etc) in
EmberobjectBut when I run
ember sand open application in Browser, I can get, for exampleEmber.ServiceDo you know, how to import
Service,Controller,Componentand all Ember Classes like these?Thanks.
Gruntfile config:
grunt.loadNpmTasks('grunt-browserify'); .../ browserify: { loginPage: { options: { browserifyOptions: { debug: true, }, transform: [ "browserify-handlebars", ["babelify", { "presets": ['@babel/preset-env'], "plugins": ['@babel/proposal-class-properties', 'babel-plugin-ember-modules-api-polyfill'] }]], extensions: ['.js', '.hbs'] }, files: { 'dist/sign-in.js': ['app/routes/sign-in.js', 'app/templates/sign-in.hbs'] } },
Posts: 2
Participants: 2
