Skip to content

Commit

Permalink
Merge pull request #26 from collectrium/fix-fastboot
Browse files Browse the repository at this point in the history
Fix fastboot
  • Loading branch information
LevonHaroutyunyan1 authored Aug 25, 2021
2 parents 618d663 + 2338cbb commit be02cc8
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
/* jshint node: true */
'use strict';
"use strict";

const FASTBOOT_TRANSFORMATION_OPTION = {
using: [
{
transformation: 'fastbootShim',
},
],
};

module.exports = {
name: '@upsilon/ember-range-slider',
included: function(app) {
if (!process.env.EMBER_CLI_FASTBOOT) {
app.import('node_modules/' + 'hammerjs/hammer.js');
}
}
name: "@upsilon/ember-range-slider",

included(app) {
this._super.included(app);

let hasFastboot = this.project.findAddonByName('ember-cli-fastboot');
let importOptions = hasFastboot ? FASTBOOT_TRANSFORMATION_OPTION : {};
app.import(
'node_modules/hammerjs/hammer.js',
importOptions
);
},
};

0 comments on commit be02cc8

Please sign in to comment.