moved modules to typescript. Tell Webpack to use global window.angular object in order to migrate components gradually into bundle

This commit is contained in:
alecmerdler 2017-01-19 00:53:38 -08:00
parent d5a74af024
commit c55e9f2d12
15 changed files with 590 additions and 505 deletions

View file

@ -2,7 +2,7 @@ var webpack = require('webpack');
var path = require("path");
var config = {
entry: ["./static/js/app.tsx", "./static/js/services/angular-view-array/angular-view-array.ts"],
entry: ["./static/js/app.tsx", "./static/js/quay.module.ts"],
output: {
path: path.resolve(__dirname, "static/js/build"),
filename: "bundle.js"
@ -13,6 +13,9 @@ var config = {
"sass": path.resolve('./static/css/directives/components/pages/')
}
},
externals: {
"angular": "angular",
},
module: {
loaders: [
{
@ -24,10 +27,14 @@ var config = {
test: /\.scss$/,
loaders: ['style', 'css', 'sass'],
exclude: /node_modules/
},
{
test: /angular\.js$/,
loader: 'expose?angular',
}
]
},
devtool: "cheap-eval-source-map",
devtool: "source-map",
};
module.exports = config;