Skip to content

Commit cd91f23

Browse files
committed
Only copy needed files in webpack
1 parent 0bea4da commit cd91f23

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

webpackBaseConfig.js

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,28 +121,45 @@ module.exports = {
121121
inject: false
122122
}),
123123
new CopyWebpackPlugin([
124+
{
125+
context: path.join(__dirname, 'node_modules/mathjax'),
126+
from: 'MathJax.js',
127+
to: 'MathJax/'
128+
},
124129
{
125130
context: path.join(__dirname, 'node_modules/mathjax'),
126131
from: {
127-
glob: '**/*',
132+
glob: 'config/**/*.js',
128133
dot: false
129134
},
130135
to: 'MathJax/'
131136
},
132137
{
133138
context: path.join(__dirname, 'node_modules/emojify.js'),
134139
from: {
135-
glob: '**/*',
140+
glob: 'dist/**/*',
136141
dot: false
137142
},
138143
to: 'emojify.js/'
139144
},
140145
{
141146
context: path.join(__dirname, 'node_modules/reveal.js'),
142-
from: {
143-
glob: '**/*',
144-
dot: false
147+
from: 'js',
148+
to: 'reveal.js/'
149+
},
150+
{
151+
context: path.join(__dirname, 'node_modules/reveal.js'),
152+
from: 'css',
153+
to: 'reveal.js/'
145154
},
155+
{
156+
context: path.join(__dirname, 'node_modules/reveal.js'),
157+
from: 'lib',
158+
to: 'reveal.js/'
159+
},
160+
{
161+
context: path.join(__dirname, 'node_modules/reveal.js'),
162+
from: 'plugin',
146163
to: 'reveal.js/'
147164
}
148165
])

0 commit comments

Comments
 (0)