wix-incubator / stylable-integration

Integrating Stylable into your project
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Does not support webpack 4 #30

Closed ranyitz closed 6 years ago

ranyitz commented 6 years ago

Webpack 4 was officially released and has some breaking changes for loaders and plugins, here is the migration guide.

When using the webpack plugin it throws errors, I think it related to chunk Graph and chunkGroup changes. You can look at this PR for reference.

This is currently the only thing that stops us from migrating to webpack 4.

yavorsky commented 6 years ago

I've this error when trying to run stylable-loader with webpack 4:

Error: Chunk.parents: Use ChunkGroup.getParents() instead
    at Chunk.get (/Users/artemy/Development/OSS/wix-haste/haste-preset-yoshi/node_modules/webpack/lib/Chunk.js:438:9)
    at /Users/artemy/Development/OSS/wix-haste/haste-preset-yoshi/node_modules/stylable-integration/dist/src/webpack-loader.js:150:75
    at Array.map (<anonymous>)
    at /Users/artemy/Development/OSS/wix-haste/haste-preset-yoshi/node_modules/stylable-integration/dist/src/webpack-loader.js:149:36
idoros commented 6 years ago

We are currently evaluating adding support for Webpack 4, hope to have more on the matter soon.

aarnoldaas commented 6 years ago

Hi! is there any news? Stylable now used by wix-style-react. This stops a lot of project migrating to yoshi@2 (webpack4)

Scott-MacD commented 6 years ago

Also hoping to see this updated. Trying to get started evaluating stylable as part of our new stack, however if we choose to go down the webpack route we're stuck with stylable not supporting webpack 4, and some of the other tools in our build process not compatible with webpack 3.

tomrav commented 6 years ago

The new webpack 4 plugin is just about done - if you wish to try it out for yourself, you can find the repo here

We'll be sure to update this thread and documentation once it is officially released.

Scott-MacD commented 6 years ago

How does one set up the loader for the new plugin?

Scott-MacD commented 6 years ago

Got this working without having to specify any sort of loader following the experimental repo. Pretty sure that was what I tried in the first place when I had issues, but that was on a different machine. I'll confirm if everything is working properly on that machine as well when I'm back in the office on Monday.

Awesome work guys!

tomrav commented 6 years ago

You are correct in saying that In the new integration, you do not need to configure the loader. We have decided to lock down the file type suffix to .st.css.

Glad to hear you've got it working, please let us know if you're encountering any unexpected behavior.

Scott-MacD commented 6 years ago

Confirming this is all working as expected. I'm not able to reproduce the issue I had initially, so not sure what I did wrong, but I don't think it's any bug with the new plugin.

tomrav commented 6 years ago

Hey folks, just updating that the webpack 4 plugin is officially live. The old webpack 3 plugin will be deprecated in the near future. Updated docs can be found here.