Skip to content

Commit

Permalink
chore(git): don't git ignore the webpack config file
Browse files Browse the repository at this point in the history
  • Loading branch information
ocombe committed Oct 21, 2016
1 parent cd5eeba commit 7263d09
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ npm-debug.log
*.js
!config/*
!karma.conf.js
!webpack.config.js
*.map
*.d.ts
!make.js
Expand Down
59 changes: 59 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* Adapted from angular2-webpack-starter
*/

const helpers = require('./config/helpers'),
webpack = require('webpack');

/**
* Webpack Plugins
*/
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');

module.exports = {
devtool: 'inline-source-map',

resolve: {
extensions: ['.ts', '.js']
},

entry: helpers.root('ng2-translate.ts'),

output: {
path: helpers.root('bundles'),
publicPath: '/',
filename: 'index.js',
libraryTarget: 'umd',
library: 'ng2-translate'
},

// require those dependencies but don't bundle them
externals: [/^\@angular\//, /^rxjs\//],

module: {
rules: [{
enforce: 'pre',
test: /\.ts$/,
loader: 'tslint',
exclude: [helpers.root('node_modules')]
}, {
test: /\.ts$/,
loader: 'awesome-typescript-loader',
exclude: [/\.e2e\.ts$/]
}]
},

plugins: [
new webpack.LoaderOptionsPlugin({
options: {
tslintLoader: {
emitErrors: false,
failOnHint: false
}
}
})
]
};

0 comments on commit 7263d09

Please sign in to comment.