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

cannot require less files in componnents #57

Closed
frankleng opened this issue Jan 24, 2015 · 1 comment
Closed

cannot require less files in componnents #57

frankleng opened this issue Jan 24, 2015 · 1 comment

Comments

@frankleng
Copy link

when I use require('style.less'), the component will not work and the JSX transpiler complains about unexpected characters.
ex. using the included TextBox component which has a less require statement.

@koistya please advise. thanks!

@koistya
Copy link
Member

koistya commented Jan 24, 2015

As a workaround, try adding the following line to the gulpfile.js file:

require.extensions['.less'] = function(m, file) { m._compile('', file); };

This way .less files should be ignored when Gulp is trying to pre-compile React components with gulp-render plugin.

This issue is going to be fixed in the upcoming commit.

@koistya koistya closed this as completed in 9f49066 Feb 8, 2015
vishwanatharondekar added a commit to vishwanatharondekar/react-starter-kit that referenced this issue Oct 16, 2015
 - Refactor webpack config
 - Generate source maps in debug mode
 - Create two bundles during a build - `./build/app.js` (client-side) and `./build/server.js` (server-side)
 - Replace the original JSX transpiler with 6to5
 - Register core-js polyfills
 - Clean up the top-level React component (App)
 - Load page content asynchronously
 - Remove `./src/images` folder and `images` Gulp task in favor of images-per-component

Closes kriasoft#57, kriasoft#55, kriasoft#53,  kriasoft#4
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

No branches or pull requests

2 participants