Open nickiaconis opened 7 years ago
I have a not-entirely-working workaround, using broccoli-eyeglass. Something to the tune of:
/* eslint-env node */
'use strict';
const CompileSass = require('broccoli-eyeglass');
const findRoot = require('find-root');
const path = require('path');
module.exports = {
name: 'my-addon',
treeForVendor() {
const styleTree = new CompileSass(['addon/styles'], {
cssDir: './',
includePaths: [
findRoot(require.resolve('eyeglass-module-1')),
path.join(findRoot(require.resolve('module-2')), 'dist/css'),
],
sourceFiles: [
'my-addon.scss',
],
cssFilename: 'my-addon.css',
});
return styleTree;
},
included() {
this._super.included.apply(this, arguments);
const vendorCss = path.join('vendor', 'my-addon.css');
this.import(vendorCss);
},
};
Can you whip up a demo that I could use to debug this?
@rwjblue Here's something at the very least: https://github.com/nickiaconis/eyeglass-addon-demo
Not exactly sure why addon/styles/<addon_name>.css
isn't getting included; I have a MP in which that works. It definitely demonstrates that addon/styles/<addon_name>.scss
isn't getting included though.
@rwjblue I did a little digging today. I think it's just the tip of the iceberg, but inApp
becomes true here when building the addon's dummy app.
addon/styles/<addon_name>.scss
doesn't get included in the build. To parallel default ember-cli functionality, which includesaddon/styles/<addon_name>.css
in the build, it should.This is probably related to #9.
cc @chriseppstein @stefanpenner