Skip to content

Support css modules at front/server side #442

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 2 commits into from
Closed

Support css modules at front/server side #442

wants to merge 2 commits into from

Conversation

PowerfulPony
Copy link

work depends on the following revisions

@PowerfulPony
Copy link
Author

Just due to the need to use "css modules" at SSR

These changes are possible because of @YiSiWang
#422
#331

@yyx990803
Copy link
Member

Is there any change in this PR that is not covered / needs to be addressed in #422 ? - would it be better if we merge the two dependent PRs and then merge #422 instead?

@PowerfulPony
Copy link
Author

PowerfulPony commented Nov 3, 2016

+It works with SSR
+The server-bundle fall only css modules
+css modules are named according to the attribute of the module
Because styles are loaded through vue-style-loader, it is necessary to fix the fragment associated with the addition of hot.reload script vuejs/vue-style-loader#1
Cause the server to will throw an error because the browser checks

In this PR are implemented that was available in version 8, there is also support for SSR.
Important to me only anyside support css-module, since using SSR.

It is also possible to fully restore the documentation of version 8
#331

I am for the result! I try to pay attention to the problem by offering a solution
I just want to pay attention to the css-modules, in the name of the module, and ssr

@YiSiWang
Copy link

YiSiWang commented Nov 4, 2016

@PowerfulPony Thank you for pointing out problems with SSR. But I think it's better to drop style-loader when in SSR.

  1. Faster && less code
  2. No need for Do not add a handler on the server vue-style-loader#1

I've done it in #422 with test case.

@PowerfulPony
Copy link
Author

@YiSiWang
Yes, such a solution is better
vuejs/vue#4091 Please pay attention, it is already possible to use the attribute in dev branch

@yyx990803
Copy link
Member

In that case, closing this in favor of #422

@yyx990803 yyx990803 closed this Nov 4, 2016
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.

3 participants