decide.nolog.cz/ember-cli-build.js

64 lines
1.8 KiB
JavaScript
Raw Permalink Normal View History

'use strict';
2016-03-18 13:01:50 +01:00
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
2024-02-17 13:52:09 +01:00
const SubresourceIntegrityPlugin = require('webpack-subresource-integrity-embroider');
2015-11-20 00:17:15 +01:00
module.exports = function (defaults) {
2023-10-17 11:38:49 +02:00
const app = new EmberApp(defaults, {
buildInfoOptions: {
metaTemplate: 'version={SEMVER}',
2016-05-24 01:06:47 +02:00
},
'ember-bootstrap': {
importBootstrapCSS: false,
bootstrapVersion: 4,
importBootstrapFont: false,
},
'ember-cli-babel': {
enableTypeScriptTransform: true,
},
autoprefixer: {
browsers: ['last 2 ios version'],
cascade: false,
sourcemap: true,
},
sassOptions: {
sourceMapEmbed: true,
includePaths: ['node_modules'],
},
2015-11-20 00:17:15 +01:00
});
app.import('node_modules/open-iconic/font/fonts/open-iconic.ttf');
app.import('node_modules/open-iconic/font/fonts/open-iconic.woff');
2024-02-17 13:52:09 +01:00
const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticModifiers: true,
staticComponents: true,
// `ember-cli-deprecation-workflow` does not support `staticEmberSource = true`
// yet. See https://github.com/mixonic/ember-cli-deprecation-workflow/issues/156
// for details.
staticEmberSource: false,
skipBabel: [
{
package: 'qunit',
},
],
packagerOptions: {
webpackConfig: {
devtool: 'source-map',
plugins: [new SubresourceIntegrityPlugin()],
resolve: {
fallback: {
// SJCL supports node.js as well using node's crypto module.
// We don't want it to be included in the bundle.
crypto: false,
},
},
},
},
});
2015-11-20 00:17:15 +01:00
};