elm-css-modules-loader icon indicating copy to clipboard operation
elm-css-modules-loader copied to clipboard

Add Webpack 4 support

Open sentience opened this issue 7 years ago • 1 comments
trafficstars

We aren’t aware of any specific compatibility issues with this loader and Webpack 4, but we haven’t yet tested it extensively, and so the current release still specifies webpack <4 in its peerDependencies.

We’d appreciate hearing from anyone who’s tried this loader with Webpack 4 and is able to report on how/if it worked for them. If not, we will eventually update this ourselves when we upgrade to Webpack 4.

sentience avatar May 05 '18 02:05 sentience

Just trying to update to webpack 4 now and found that this line wasn't caught:

var _user$project$Zap_View_Link_Button$cssm = A2(
	_cultureamp$elm_css_modules_loader$CssModules$css,
	'./Zap/View/Button.cssm.scss',
	{btn: '', large: '', primary: '', secondary: '', $default: '', danger: '', safety: '', submit: ''});

I suspect it is due to how the default name is escaped. Perhaps it was handled differently in previous versions. The currently used regex for the JS object doesn't allow for $.

If I change this to include a $ then it seems to work.

michaeljones avatar Jun 07 '18 13:06 michaeljones