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

webpack entry file cannot be a coffee script file #13

Closed
bsergean opened this issue Aug 20, 2015 · 7 comments
Closed

webpack entry file cannot be a coffee script file #13

bsergean opened this issue Aug 20, 2015 · 7 comments

Comments

@bsergean
Copy link

If there is a work-around I would use it, but I can't figure it out. I'm using browserify right now and I was looking into webpack. Here is what I have in my makefile so far (using browserify).

coffee -w -c sm.coffee engine.coffee &
watchify -t glslify sm.js engine.js -o bundle.js -v

Here are the files in my project: I have only 2 sources coffee files, and 2 glsl shaders.

src$ ls
bundle.js  engine.coffee  index.html  js  makefile  
node_modules  sm.coffee  sm.js  vert.glsl frag.glsl sm.py webpack.config.js

Here is what my webpack.config.js file looks like: I would like to specify my entry point to be my main coffee script file.

module.exports = {
    entry: 'engine.coffee',
    output: {
        filename: "bundle.js"
    },
    loaders: [
        { test: /\.coffee$/, loader: "coffee-loader" }
    ]
}

It looks like I can use loaders to embed my glsl files, and to compile my cofeescript. If I'm missing something I'd appreciate it to be pointed out.

Thanks !

@mainiak
Copy link

mainiak commented Sep 4, 2015

I have similar issue. I've created demo to reproduce the issue https://gist.github.com/mainiak/1ae02e2694054f5fa6be#file-readme-md

@sokra
Copy link
Member

sokra commented Oct 15, 2015

entry: './engine.coffee',

@mainiak
Copy link

mainiak commented Oct 15, 2015

Tobias (@sokra) - if I change my gist to have JavaScript file as entry point - and require coffee script file in it - it will just throw different kind of error.

@ericsorenson
Copy link

👍

@ghost
Copy link

ghost commented Jan 30, 2016

I'm in the same boat here. I'd like to see this implemented, as my codebase is geared around using that index.coffee file and without being able to specify it as an entry point it's much more difficult to use this module.

@franciscolourenco
Copy link

This is working for me

@bsergean
Copy link
Author

bsergean commented Jul 3, 2016

Looks like this is working now, I'm not very interested in this myself so if it turns out it doesn't really work, someone can file another issue.

@bsergean bsergean closed this as completed Jul 3, 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

No branches or pull requests

5 participants