Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
fix(webpack-server): fix previous merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Metnew committed Feb 19, 2018
1 parent 88fded3 commit 5a4bf33
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions webpack_config/server/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ const definePluginArgs = {
const devtool = isProduction ? 'cheap-source-map' : 'eval'
const chunkFilename = isProduction ? '[name].[chunkhash:6].js' : '[name].js'

let nodeModules = {}
fs
.readdirSync('node_modules')
.filter(x => {
return ['.bin'].indexOf(x) === -1
})
.forEach(mod => {
nodeModules[mod] = 'commonjs ' + mod
})

const baseWebpackConfig = {
name: 'server',
entry: config.srcPath,
Expand All @@ -39,8 +29,7 @@ const baseWebpackConfig = {
path: path.join(config.distPath, './server'),
filename: 'index.js',
chunkFilename,
publicPath,
libraryTarget: 'commonjs2'
publicPath
},
externals: [
nodeExternals({
Expand All @@ -62,23 +51,7 @@ const baseWebpackConfig = {
alias: isomorphicWebpackConfig.resolve.alias
},
module: {
rules: isomorphicWebpackConfig.module.rules.concat([
// NOTE: LQIP loader doesn't work with file-loader and url-loader :(
// `npm i --save-dev lqip-loader`
// {
// test: /\.(jpe?g|png)$/i,
// enforce: 'pre',
// loaders: [
// {
// loader: 'lqip-loader',
// options: {
// path: '/images-lqip', // your image going to be in media folder in the output dir
// name: '[name]-lqip.[hash:8].[ext]' // you can use [hash].[ext] too if you wish
// }
// }
// ]
// }
])
rules: isomorphicWebpackConfig.module.rules
},
plugins: isomorphicWebpackConfig.plugins.concat([
new webpack.DefinePlugin(definePluginArgs),
Expand Down

0 comments on commit 5a4bf33

Please sign in to comment.