Moved to webpack 3

This commit is contained in:
Jori Lallo
2018-01-03 16:29:01 -08:00
parent 26bd61df1b
commit 686c237e36
10 changed files with 603 additions and 465 deletions

View File

@@ -27,10 +27,10 @@ module.exports = {
publicPath: '/static/',
},
module: {
loaders: [
rules: [
{
test: /\.js$/,
loader: 'babel',
loader: 'babel-loader',
include: [
path.join(__dirname, 'app'),
path.join(__dirname, 'shared'),
@@ -45,7 +45,10 @@ module.exports = {
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader'),
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
}),
},
{ test: /\.md/, loader: 'raw-loader' },
],
@@ -53,14 +56,20 @@ module.exports = {
noParse: [new RegExp('node_modules/localforage/dist/localforage.js')],
},
resolve: {
root: path.resolve(__dirname, 'app'),
extensions: ['', '.js', '.json'],
alias: { shared: path.resolve(__dirname, 'shared') }
modules: [
path.resolve(__dirname, 'app'),
'node_modules'
],
alias: {
shared: path.resolve(__dirname, 'shared'),
'boundless-utils-omit-keys': 'boundless-utils-omit-keys/build',
'boundless-utils-uuid': 'boundless-utils-uuid/build'
}
},
plugins: [
definePlugin,
new webpack.ProvidePlugin({
fetch: 'imports?this=>global!exports?global.fetch!isomorphic-fetch',
fetch: 'imports-loader?this=>global!exports-loader?global.fetch!isomorphic-fetch',
}),
new webpack.ContextReplacementPlugin(/moment[\\\/]locale$/, /^\.\/(en)$/),
new webpack.IgnorePlugin(/unicode\/category\/So/),