Skip to content

Fixes #1212 - Ignore flatpickr file in vendor if auto import is enabled#1213

Open
ahamed-althaf wants to merge 2 commits into
RobbieTheWagner:mainfrom
ahamed-althaf:auto-import-support
Open

Fixes #1212 - Ignore flatpickr file in vendor if auto import is enabled#1213
ahamed-althaf wants to merge 2 commits into
RobbieTheWagner:mainfrom
ahamed-althaf:auto-import-support

Conversation

@ahamed-althaf
Copy link
Copy Markdown

@ahamed-althaf ahamed-althaf commented Jun 27, 2022

#1212

Example:

ember-cli-build.js

'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function (defaults) {

  let app = new EmberAddon(defaults, options);

  /*
    This build file specifies the options for the dummy test app of this
    addon, located in `/tests/dummy`
    This build file does *not* influence how the addon or the app using it
    behave. You most likely want to be modifying `./index.js` or app's build file
  */

  flatpickr: {
    includeInVendor: false // true or false should decide whether it needs to be included in vendor file or not.
  }
};

In a specific route file where we need to use flatpickr

import Route from '@ember/routing/route';

export default Route.extend({
  model() {
    return import('flatpickr').then((module) => module.default);
  }
});

@ahamed-althaf ahamed-althaf changed the title Ignore flatpickr file in vendor if auto import is enabled Fixes #1212 - Ignore flatpickr file in vendor if auto import is enabled Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant