use ember-auto-import to import sjcl (#176)
This commit is contained in:
parent
1dd7ee7ce3
commit
5edb3f3b0f
1 changed files with 8 additions and 10 deletions
|
@ -5,11 +5,15 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|||
module.exports = function(defaults) {
|
||||
let app = new EmberApp(defaults, {
|
||||
autoImport: {
|
||||
// exclude sjcl from auto imports as it's imported through `app.import()`
|
||||
// to avoid blowing up build size
|
||||
// https://github.com/ef4/ember-auto-import/issues/208
|
||||
exclude: ['sjcl'],
|
||||
forbidEval: true,
|
||||
webpack: {
|
||||
externals: {
|
||||
// sjcl requires node's cryto library, which isn't needed
|
||||
// in Browser but causes webpack to bundle a portable version
|
||||
// which increases the build size by an inacceptable amount
|
||||
crypto: "null",
|
||||
},
|
||||
},
|
||||
},
|
||||
'buildInfoOptions': {
|
||||
'metaTemplate': 'version={SEMVER}'
|
||||
|
@ -44,11 +48,5 @@ module.exports = function(defaults) {
|
|||
// please specify an object with the list of modules as keys
|
||||
// along with the exports of each module as its value.
|
||||
|
||||
app.import('node_modules/sjcl/sjcl.js', {
|
||||
using: [
|
||||
{ transformation: 'amd', as: 'sjcl' }
|
||||
]
|
||||
});
|
||||
|
||||
return app.toTree();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue