Created
December 24, 2015 16:33
-
-
Save stepancar/4b1009389d0390acf650 to your computer and use it in GitHub Desktop.
This file contains 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
var webpack = require("webpack"); | |
module.exports = { | |
entry: { | |
vendorJquery: ['jquery'], // names of modules (name of module, which u use for import statement in ts/js) | |
vendorReact: ['react', 'react-dom'], // names of modules (name of module, which u use for import statement in ts/js) | |
app: './scripts/app/app.tsx', | |
models: "./scripts/models/country.ts", | |
components: ["./scripts/components/countryTable.tsx", "./scripts/components/countryTableRow.tsx"], | |
}, | |
output: { | |
path: './scripts/bundles/', | |
filename: "[name].js" | |
}, | |
resolve: { | |
extensions: ['', '.Webpack.js', '.web.js', '.ts', '.js', '.tsx'] | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.tsx?$/, | |
exclude: /(node_modules|bower_components)/, | |
loader: 'ts-loader' | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.optimize.CommonsChunkPlugin("./scripts/bundles/react.js", ["vendorReact"]), | |
new webpack.optimize.CommonsChunkPlugin("./scripts/bundles/jquery.js", ["vendorJquery"]) | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment