diff --git a/config/default.js b/config/default.js index 27e3fd2096fed065502483fb9fc7173c05fa64a6..fdf9914343b509bac060e2060e07b23dc43ac2cd 100644 --- a/config/default.js +++ b/config/default.js @@ -15,6 +15,7 @@ module.exports = { port: 3000, logger, uploads: 'uploads', + enableExperimentalGraphql: true, typeDefs: ` type Manuscript { id: ID! diff --git a/styleguide.config.js b/styleguide.config.js index f630d33c15c176df3ea9223754ad3efe37e70bfa..3fc843ce10d8d7f53e3ecb053116bd1eb0f08d25 100644 --- a/styleguide.config.js +++ b/styleguide.config.js @@ -13,7 +13,7 @@ module.exports = { ], webpackConfig: { module: { - rules: require('./webpack/rules.development.js'), + rules: require('./webpack/rules.js'), }, }, context: { diff --git a/webpack/rules.development.js b/webpack/rules.js similarity index 100% rename from webpack/rules.development.js rename to webpack/rules.js diff --git a/webpack/rules.production.js b/webpack/rules.production.js deleted file mode 100644 index 0fe8d5b7e26111759ee1c581d90bfa22dd195de7..0000000000000000000000000000000000000000 --- a/webpack/rules.production.js +++ /dev/null @@ -1,60 +0,0 @@ -const ExtractTextPlugin = require('extract-text-webpack-plugin') -const include = require('./babel-includes') -const stringReplaceRule = require('./string-replace') - -module.exports = [ - stringReplaceRule, - { - oneOf: [ - // ES6 JS - { - test: /\.jsx?$/, - include, - loader: 'babel-loader', - options: { - presets: [ - [require('babel-preset-env'), { modules: false }], - require('babel-preset-react'), - require('babel-preset-stage-2'), - ], - }, - }, - - // CSS Modules - { - test: /\.local\.css$/, - include, - use: ExtractTextPlugin.extract({ - fallback: 'style-loader', - use: [ - { - loader: 'css-loader', - options: { - modules: true, - localIdentName: '[name]_[local]-[hash:base64:8]', - }, - }, - ], - }), - }, - - // global CSS - { - test: /\.css$/, - use: ExtractTextPlugin.extract({ - fallback: 'style-loader', - use: ['css-loader'], - }), - }, - - // files - { - exclude: [/\.jsx?$/, /\.html$/, /\.json$/], - loader: 'file-loader', - options: { - name: 'static/media/[name].[hash:8].[ext]', - }, - }, - ], - }, -] diff --git a/webpack/webpack.development.config.js b/webpack/webpack.development.config.js index 83b1750c60b325fd7fada65dbe04d524d7b9b1cf..354a9637248cdf567079c93d67066218c4dbeef4 100644 --- a/webpack/webpack.development.config.js +++ b/webpack/webpack.development.config.js @@ -2,7 +2,7 @@ const config = require('config') const path = require('path') const webpack = require('webpack') const CopyWebpackPlugin = require('copy-webpack-plugin') -const rules = require('./rules.development') +const rules = require('./rules') const resolve = require('./common-resolve') module.exports = [ diff --git a/webpack/webpack.production.config.js b/webpack/webpack.production.config.js index be12bca47a761e227c62f1605a6043df99b6c585..cad182c00b2b595f09f73bea5f7fc7b6ace9eaac 100644 --- a/webpack/webpack.production.config.js +++ b/webpack/webpack.production.config.js @@ -5,11 +5,10 @@ const config = require('config') const path = require('path') const webpack = require('webpack') const CleanWebpackPlugin = require('clean-webpack-plugin') -const ExtractTextPlugin = require('extract-text-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin') const UglifyJSPlugin = require('uglifyjs-webpack-plugin') -const rules = require('./rules.production') +const rules = require('./rules') const resolve = require('./common-resolve') module.exports = [ @@ -47,7 +46,6 @@ module.exports = [ [config.authsome.mode]: config.authsome.mode, [config.validations]: config.validations, }), - new ExtractTextPlugin('styles/main.css'), new CopyWebpackPlugin([{ from: '../static' }]), new webpack.optimize.AggressiveMergingPlugin(), new webpack.optimize.OccurrenceOrderPlugin(), diff --git a/webpack/webpack.test.config.js b/webpack/webpack.test.config.js index 4d92d9902188b095638575eb142cbdd538964218..2ebb4c92a979631cfcd4f79331010d4b6738d1a4 100644 --- a/webpack/webpack.test.config.js +++ b/webpack/webpack.test.config.js @@ -2,7 +2,7 @@ const config = require('config') const path = require('path') const webpack = require('webpack') const CopyWebpackPlugin = require('copy-webpack-plugin') -const rules = require('./rules.development') +const rules = require('./rules') const resolve = require('./common-resolve') module.exports = [