Created
May 18, 2017 06:20
-
-
Save antonmedv/2ca413337813619ab34970ead003c8d7 to your computer and use it in GitHub Desktop.
CoffeeScript with Tree Shaking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export foo = 'foo' | |
export unused = -> foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {foo} from './foo.coffee' | |
console.log foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"coffee-loader": "^0.7.3", | |
"coffee-script": "^1.12.6", | |
"webpack": "^2.5.1" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
entry: './index.coffee', | |
output: { | |
filename: 'bundle.js' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.coffee$/, | |
use: [ 'coffee-loader' ] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment