Skip to content

Support Nuxt.js >= 2.0.0 #108

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

Closed
wants to merge 3 commits into from

Conversation

rclement
Copy link

This PR aims at fixing the compatibility with Nuxt.js >= 2.0.0:

  • New dependencies: extract-text-webpack-plugin, friendly-errors-webpack-plugin
  • New dev-dependency: @nuxt/common
  • Replace usage of r() and urlJoin() from nuxt using the @nuxt/common package
  • Update webpack config
    • Replace module.loaders with module.rules
    • Resolve CHUNK_FILENAME as a string, depending on Nuxt build configuration

This fixes issues #104 and #105.
This can be tested using the @rmnclmnt/nuxt-netlify-cms package.

@medfreeman
Copy link
Owner

thanks! also closes #60

@rclement
Copy link
Author

@medfreeman here are the latest enhancements to this PR:

  • I merged back your upstream changes in master branch to resolve conflicts in package.json
  • Following the advice in Compatibility with nuxt2 (nuxt-edge) #60, I replaced extract-text-webpack-plugin (deprecated) with mini-css-extract-plugin for webpack v4 compatibility

Feel free to comment on this!
Thanks!

@medfreeman
Copy link
Owner

Hi !
Sorry but it seems my circleci settings do not build forked pull requests.
Thanks for the work, but the commits aren't enough since they do not pass tests at all.
I pretty much finished the work while keeping your commit in the rclement-support-nuxt-2.0 branch.

I used extract-css-chunks-webpack-plugin, as nuxt 2.0 does.

@medfreeman
Copy link
Owner

I'm testing the example atm, and will update test snapshots then merge to master.
I'll also keep the previous code in @nuxt1 branch.

@medfreeman
Copy link
Owner

Oh, it seems i need webpack bar, and a way to register the admin compiler in nuxt compilers to streamline the output also.

@medfreeman
Copy link
Owner

closing in favor of #111

@medfreeman medfreeman closed this Jan 19, 2019
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.

2 participants