Created
August 15, 2016 14:10
-
-
Save sburns/78562ce70a9dacb9ebacf8971201dcc3 to your computer and use it in GitHub Desktop.
Stratasan Confident Asset Deployments, Pt2: App-Specific Configuration File
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
const path = require('path'); | |
module.exports = options => ({ | |
externals: { | |
jquery: 'jQuery' | |
}, | |
entry: { | |
account: [ | |
'babel-polyfill', | |
path.join(__dirname, '../../health/account/assets') | |
], | |
init: [ | |
path.join(__dirname, '../../health/assets/lib/addEventListener'), | |
path.join(__dirname, '../../health/assets/lib/svgPolyfill') | |
] | |
}, | |
output: { | |
path: options.destPath, | |
filename: options.jsFilename | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.json$/, loader: 'json-loader' }, | |
{ | |
test: /\.js$/, | |
loader: 'babel', | |
query: { | |
cacheDirectory: true, | |
presets: ['es2015', 'stage-2'] | |
}, | |
exclude: /node_modules/ | |
}, | |
{ test: /\.scss$/, loader: options.styleLoaders, exclude: /node_modules/ }, | |
{ test: /node_modules\/.*\.css$/, loader: 'style!css' }, | |
{ | |
test: /\.png$/, | |
loader: 'file-loader', | |
query: { | |
name: 'svg/icon-[name].fallback.[ext]' | |
} | |
}, | |
{ | |
test: /\.gif$/, | |
loader: 'file-loader', | |
query: { | |
name: 'img/[name].[ext]' | |
}, | |
exclude: /node_modules/ | |
} | |
] | |
}, | |
postcss: options.postcss, | |
resolve: { | |
root: path.join(__dirname, '/assets'), | |
modulesDirectories: ['node_modules'], | |
extensions: ['', '.js'] | |
}, | |
plugins: options.plugins | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment