Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octane / module unification support #883

Open
NullVoxPopuli opened this issue Jan 21, 2018 · 7 comments
Open

octane / module unification support #883

NullVoxPopuli opened this issue Jan 21, 2018 · 7 comments

Comments

@NullVoxPopuli
Copy link

I did:

npm install -g https://github.com/ember-cli/ember-cli.git
ember new ember-app --blueprint module-unification-app --yarn
ember install ember-paper

I moved app/styles/app.scss to ui/styles/app.scss

Got this error

Build Error (SassCompiler)

File not found: /app/styles/app.scss
in any of the following include paths:
  /home/me/Development/tmp/ember-app/tmp/sass_compiler-input_base_path-HrmUtsmg.tmp


Stack Trace and Error Report: /tmp/error.dump.d82574aad036cdf57a0561a8215102dc.log

So, I moved the file back to app/styles/app.scss, and the problem/error was the exact same.
I even tried the steps again without moving the defaultly generated file.

@NullVoxPopuli
Copy link
Author

Here is a test app: https://github.com/NullVoxPopuli/test-ember-paper-with-module-unification

Some notes on setting things up:

npm install -g https://github.com/ember-cli/ember-cli.git
# output omitted
MODULE_UNIFICATION=true EMBER_CLI_MODULE_UNIFICATION=true ember new test-ember-paper-with-module-unification
# output omitted
cd test-ember-paper-with-module-unification
# output omitted
yarn
# output omitted
ember- install ember-paper
# output omitted
yarn start
yarn run v1.7.0
$ ember serve
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Deprecation warning: sassOptions should be moved to your ember-cli-build
Build Error (ConfigReplace)

ENOENT: no such file or directory, stat '/home/me/Development/NullVoxPopuli/test-ember-paper-with-module-unification/tmp/config_replace-input_base_path-sd0dO3vt.tmp/0/index.html'


Stack Trace and Error Report: /tmp/error.dump.097bcfd9117d288a7c91c0b812847f6f.log

blueprint still using classic layout -- which is fine. I move content to src/ui/styles/app.scss
image
I delete the app folder, and re-run yarn start

yarn run v1.7.0
$ ember serve
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Deprecation warning: sassOptions should be moved to your ember-cli-build
Build Error (ConfigReplace)

ENOENT: no such file or directory, stat '/home/me/Development/NullVoxPopuli/test-ember-paper-with-module-unification/tmp/config_replace-input_base_path-s0K9Is7y.tmp/0/index.html'


Stack Trace and Error Report: /tmp/error.dump.9df0ae4736a5d0d1a0179715c4bd0d95.log

So, I'm not sure if this is a module-unification issue or an ember-paper one.

//cc @miguelcobain @mixonic

@blmundie
Copy link

ember-cli/ember-cli#8133

@NullVoxPopuli
Copy link
Author

NullVoxPopuli commented Feb 4, 2019

good news:
it kinda works now:

the only remaining TODO is to:

ember new my-app -b ember-octane-app-blueprint # note: this blueprint name may change in the future
cd my-app
yarn ember install ember-paper
mv app/styles/app.scss src/ui/styles/app.scss
rm -rf app/
rm -rf src/ui/styles/app.css
yarn start
# replace welcome page with any ember-paper component

@NullVoxPopuli NullVoxPopuli changed the title module unification support octane / module unification support Feb 4, 2019
@miguelcobain
Copy link
Collaborator

@NullVoxPopuli it would be nice we could detect if the addon is being installed in an MU enabled app and create the scss file accordingly.

@NullVoxPopuli
Copy link
Author

@miguelcobain I think there is an isModuleUnification() helper function on ... the project object? It's been a while since I looked at that. But yes! there is a way! :D

@ppcano
Copy link

ppcano commented Feb 4, 2019

@miguelcobain

it would be nice we could detect if the addon is being installed in an MU enabled app and create the scss file accordingly.

Yes, I also think we need an API for that.

See how it has been detected at
https://github.com/ember-cli/ember-welcome-page/blob/1b62db3bbd728c8a2df9dd1e56739a2b94be0a40/index.js#L17

@ppcano
Copy link

ppcano commented Feb 9, 2019

@NullVoxPopuli emberjs/ember.js#17234 (comment)

seems like it mostly has to do with there styles get exposed to the host app. idk if there is something simple we can do so that existing style addons can "just work", or if we're going to make all the style addons add an octane / isModuleUnification condition?

  1. Importing styles into MU apps from Classic addons works. I have tested a few addons and seems to be working, there may be unexpected edge cases but they have to be reported by addon authors and investigated.

This particular issue is that the blueprint generator does not create file in the correct location for MU apps and it should be fixed by #1054

  1. Atm, the API is project.isModuleUnification.

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

No branches or pull requests

4 participants