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

Beta 2 #1806

Merged
merged 28 commits into from
Jan 19, 2017
Merged

Beta 2 #1806

merged 28 commits into from
Jan 19, 2017

Conversation

retlehs
Copy link
Member

@retlehs retlehs commented Jan 11, 2017

this should partially fix #1804. known issue:

initial browsersync session is still broken and will return the following message:

Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_2__util_Router__[false] is not a constructor
    at Object.<anonymous> (main.js:23)
    at Object.<anonymous> (main.js:27)
    at __webpack_require__ (bootstrap f2d9dd8…:659)
    at fn (bootstrap f2d9dd8…:83)
    at Object.<anonymous> (tether.js:1811)
    at __webpack_require__ (bootstrap f2d9dd8…:659)
    at bootstrap f2d9dd8…:708
    at bootstrap f2d9dd8…:708

error goes away and browsersync should work as expected if you follow these steps:

1. save a file (make a styling change)
2. manually refresh your browsersync session

testing would be appreciated /cc @emilsgulbis @dappa @MWDelaney @psorensen

edit: this branch has since been updated with other commits, the relevant fix for #1804 is 417ce46

edit 2: #1804 is fixed after #1815

@MWDelaney
Copy link
Member

This fixes the issue for me!

@psorensen
Copy link
Contributor

Fix works for me as described by @retlehs.

@retlehs
Copy link
Member Author

retlehs commented Jan 11, 2017

thank you for testing!

@retlehs
Copy link
Member Author

retlehs commented Jan 11, 2017

@eshimischi thanks for pointing that out. updated

@tobeycodes
Copy link
Contributor

What are your thoughts on being able to always filter the data regardless of the body class? E.g. injecting theme options like social media links

@QWp6t
Copy link
Member

QWp6t commented Jan 13, 2017

@schrapel use something like...

sage('blade')->share('links', [
  'facebook' => 'https://facebook.com/myAwesomePage',
  'twitter' => 'https://twitter.com/rootswp',
  // etc..
]); 

Then in all views, a $links variable will be available.

@ghost
Copy link

ghost commented Jan 16, 2017

Hi,
I was able to fix the issue mentioned at the beginning of this thread and it is really weird.

  1. Downloaded beta-2 (1826102)
  2. cd ~/****/wp-content/themes/name/
  3. php ../composer.phar install (my composer file is in themes/)
  4. yarn upgrade extract-text-webpack-plugin@2.0.0-beta.5 to fix the webpack beta 1.9 alert in yarn
  5. edit config.json with devURL = localhost:8888 and publicPath = /wp-content/themes/name
  6. yarn build
  7. yarn run start
    At this point the webpack Module 2 error should still be there.
  8. Open assets/scripts/main.js and remove trailing comma after aboutUs.
  9. Save, manually refresh the BrowserSync window and ignore all errors.
  10. Put the comma back (type it, not CTRL+Z it)
  11. Save, manually refresh the BrowserSync window.
    All should be working perfectly fine. Edit $brand-primary: red for example and it should work.

Hope it helps troubleshooting!

@derkjn
Copy link
Contributor

derkjn commented Jan 17, 2017

I was testing this today and I noticed that when running the production build, there's something wrong with how the ExtractTextPlugin handles the paths to the fonts.

To recreate the issue, you can simply add <i class="fa fa-cog"></i> to any of your templates and open the page. You'll notice the following error in the console :
screen shot 2017-01-17 at 3 29 47 pm

This issue is resolved if I remove the publicPath: '../', configuration for css and scss from my webpack.config.js file.
Not sure exactly what's going wrong there but definitely something to look into!

retlehs and others added 6 commits January 17, 2017 14:59
* Add option to select CSS framework, add Foundation as an option
* Update dependencies
* Remove monkey-hot-loader
* Use webpack-merge instead of util/mergeWithConcat()
* Fix: copyglobs plugin `after-emit` is bound twice
* NoErrorsPlugin() is deprecated in favor of NoEmitOnErrorsPlugin()
* webpack-dev-middleware should use same publicPath as compiler
* webpack-hot-middleware/client should be prepended to entries
* Browser should refresh when HMR fails
* Bootstrap package.json has correct main property
Sometime between alpha 2 and 3, package.json was pointing to nonexistent
file, so we referenced file manually in our repo. Underlying issue was
fixed by alpha 4, so we no longer have to specify full path to file.
@retlehs retlehs merged commit 9ebe9cd into master Jan 19, 2017
@retlehs retlehs deleted the beta2 branch January 19, 2017 16:09
@retlehs
Copy link
Member Author

retlehs commented Jan 24, 2017

@derkjn unable to reproduce. please post on https://discourse.roots.io/ if you need further support

@derkjn
Copy link
Contributor

derkjn commented Jan 24, 2017

@retlehs Thanks for replying, this got fixed with #1815 . Thank you!

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

Successfully merging this pull request may close these issues.

[Bug] Beta 1: Problems with watcher (SCSS & PHP)
8 participants