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

fix archetype stylus issue #887

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

didi0613
Copy link
Contributor

@didi0613 didi0613 commented Jul 31, 2018

enable babel-plugin-react-css-modules only when needed.
fix the current archetype issue.

sample demo:
screen shot 2018-07-30 at 5 33 14 pm

getting started
screen shot 2018-07-30 at 10 45 10 am

verified shorten css names feature as well

@@ -17,7 +18,7 @@ const webpackConfigSpec = {
reporterSocketPort: { env: "WEBPACK_REPORTER_SOCKET_PORT", default: 5000 },
https: { env: "WEBPACK_DEV_HTTPS", default: false },
devMiddleware: { env: "WEBPACK_DEV_MIDDLEWARE", default: false },
cssModuleSupport: { env: "CSS_MODULE_SUPPORT", default: undefined },
cssModuleSupport: { env: "CSS_MODULE_SUPPORT", type: "boolean", default: detectCSSModule() },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default: detectCSSModule

Copy link
Contributor Author

@didi0613 didi0613 Jul 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jchip It was. They were giving me errors when i put detectCSSModule there

Unable to load /Users/s0d00px/Electrode/electrode/samples/stylus-sample/xclap.js: TypeError: x.toLowerCase is not a function
    at boolean (/Users/s0d00px/Electrode/electrode/samples/stylus-sample/node_modules/xenv-config/lib/xenv-config.js:8:11)
    at Object.default (/Users/s0d00px/Electrode/electrode/samples/stylus-sample/node_modules/xenv-config/lib/xenv-config.js:61:62)
    at sources.find.s (/Users/s0d00px/Electrode/electrode/samples/stylus-sample/node_modules/xenv-config/lib/xenv-config.js:76:42)
    at Array.find (native)
    at Object.keys.reduce (/Users/s0d00px/Electrode/electrode/samples/stylus-sample/node_modules/xenv-config/lib/xenv-config.js:76:13)
    at Array.reduce (<anonymous>)
    at xenvConfig (/Users/s0d00px/Electrode/electrode/samples/stylus-sample/node_modules/xenv-config/lib/xenv-config.js:72:36)
    at Object.<anonymous> (/Users/s0d00px/Electrode/electrode/samples/stylus-sample/node_modules/electrode-archetype-react-app-dev/config/archetype.js:41:12)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)

@@ -98,6 +98,14 @@
}
}]
]
},
"production": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't these plugins needed for css-module-prod?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind, they are there.

@jchip jchip merged commit ef1515c into electrode-io:master Jul 31, 2018
@didi0613 didi0613 deleted the fix-stylus-issue-arch-app branch August 3, 2018 22:44
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