Skip to content

Instantly share code, notes, and snippets.

@philipjfulcher
Created April 17, 2020 20:05
Show Gist options
  • Save philipjfulcher/a272f7cb62836e8c81615fd64e7dfd49 to your computer and use it in GitHub Desktop.
Save philipjfulcher/a272f7cb62836e8c81615fd64e7dfd49 to your computer and use it in GitHub Desktop.
Example webpack cnfig for building AngularJS app in Nx
const path = require('path');
module.exports = (config, context) => {
return {
...config,
module: {
strictExportPresence: true,
rules: [
{
test: /\.html$/,
use: [
{ loader: 'raw-loader' }
]
},
// Load js files through Babel
{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['angularjs-annotate']
}
}
]
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment