Skip to content

Commit

Permalink
⬆️
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Aug 22, 2020
1 parent ea851ee commit 83c501d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
18 changes: 10 additions & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SOFTWARE.

const rimraf = require('rimraf')

rimraf.sync('./dist', {},() => {
rimraf.sync('./dist', {}, () => {
console.log('rm dist')
})

Expand Down Expand Up @@ -100,12 +100,14 @@ module.exports = [
new WebpackOnBuildPlugin(() => {
fs.unlinkSync('./dist/index.js')
}),
new CopyPlugin([
{from: 'src/css', to: 'css'},
{from: 'src/images', to: 'images'},
{from: 'src/js', to: 'js'},
{from: 'types', to: 'types'},
]),
new CopyPlugin({
patterns: [
{from: 'src/css', to: 'css'},
{from: 'src/images', to: 'images'},
{from: 'src/js', to: 'js'},
{from: 'types', to: 'types'},
],
}),
],
}, {
mode: 'production',
Expand Down Expand Up @@ -163,7 +165,7 @@ module.exports = [
{
test: /\.ts$/,
use: 'ts-loader',
}
},
],
},
plugins: [
Expand Down
12 changes: 8 additions & 4 deletions webpack.start.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ module.exports = {
new webpack.DefinePlugin({
VDITOR_VERSION: JSON.stringify(pkg.version),
}),
new CopyPlugin([
{from: 'src/images', to: 'images'},
{from: 'src/js', to: 'js'},
]),
new CopyPlugin({
patterns: [
{from: 'src/css', to: 'css'},
{from: 'src/images', to: 'images'},
{from: 'src/js', to: 'js'},
{from: 'types', to: 'types'},
],
}),
],
devServer: {
contentBase: path.join(__dirname, '.'),
Expand Down

0 comments on commit 83c501d

Please sign in to comment.