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

App doesn't start and aliases are broken (Alias PR) #63

Closed
framp opened this issue Feb 21, 2015 · 4 comments
Closed

App doesn't start and aliases are broken (Alias PR) #63

framp opened this issue Feb 21, 2015 · 4 comments

Comments

@framp
Copy link
Contributor

framp commented Feb 21, 2015

The alias PR #62 broke the generator.

After generating the app nothing starts because of a missing comma on line 36 in _webpack.dist.config.js.

The default app is broken too because alias feature isn't working with ./src/styles and the default App crashes.

It's working if I change it to:

alias: {
  'styles': '../../../src/styles',
  'components': '../../../src/scripts/components/'
}

but I hope there is a better way I still haven't figured out.

Error here:

Module not found: Error: Cannot resolve 'file' or 'directory' /src/styles/normalize.css in /my-path/src/scripts/components
@ ./src/scripts/components/MyNameApp.js 9:0-31

Awesome generator btw!
Keep up the good work

@shunchu
Copy link

shunchu commented Feb 22, 2015

I'm experiencing the same issue. Thanks for filing this bug.

@nirarazi
Copy link

Same issue for me too

@d-i-b
Copy link
Contributor

d-i-b commented Feb 25, 2015

I noticed that in ./scripts/components/yourApp.js, there is

// CSS
require('./styles/normalize.css');
require('./styles/main.css');

var imageURL = require('../../images/yeoman.png');

I changed styles file paths(with that comma fix first) to

// CSS
require('../../styles/normalize.css');
require('../../styles/main.css');

also fix the issue.

Will #66 be better?

@framp
Copy link
Contributor Author

framp commented Feb 25, 2015

That was the original solution before #62, which introduced aliases.

The best solution would be to have an option on webpack to set the root path IMHO

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