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

Commit

Permalink
feat(webpack): add copy-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Metnew committed Feb 19, 2018
1 parent 0722c54 commit f2148d9
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions webpack_config/client/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ import config from '../config'
import isomorphicWebpackConfig from '../webpack.isomorphic'
import AssetsPlugin from 'assets-webpack-plugin'
import WebpackAssetsManifest from 'webpack-assets-manifest'
const {GA_ID, SENTRY_PUBLIC_DSN, CLIENT_STATIC_PATH, srcPath, publicPath, isProduction, manifest, distPath} = config
import CopyWebpackPlugin from 'copy-webpack-plugin'

const {
GA_ID,
SENTRY_PUBLIC_DSN,
CLIENT_STATIC_PATH,
srcPath,
publicPath,
rootPath,
isProduction,
manifest,
distPath
} = config

rimraf(`${distPath}/client`, {}, () => {})

Expand Down Expand Up @@ -58,7 +70,13 @@ const baseBuild = {
}),
new WebpackAssetsManifest({
assets: manifest
})
}),
new CopyWebpackPlugin([
{
from: `${rootPath}/static/public`,
to: './'
}
])
]),
target: 'web'
}
Expand Down

0 comments on commit f2148d9

Please sign in to comment.