Webpack: copy files into /static
instead of starting them there
This commit is contained in:
parent
71a6615219
commit
bc759c87b2
14 changed files with 14 additions and 19 deletions
20
.gitignore
vendored
20
.gitignore
vendored
|
@ -8,20 +8,6 @@
|
||||||
/.vs/
|
/.vs/
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
/static/packs
|
/static/
|
||||||
/static/packs-test
|
/static-test/
|
||||||
/static/emoji
|
/public/
|
||||||
/static/index.html
|
|
||||||
/static/index.html.gz
|
|
||||||
/static/404.html
|
|
||||||
/static/404.html.gz
|
|
||||||
/static/manifest.json
|
|
||||||
/static/manifest.json.gz
|
|
||||||
/static/report.html
|
|
||||||
/static/sw.js
|
|
||||||
/static/instance/**
|
|
||||||
!/static/instance/**.example
|
|
||||||
!/static/instance/**.example.*
|
|
||||||
!/static/instance/**.example/**
|
|
||||||
/static-test
|
|
||||||
/public
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ const settings = {
|
||||||
test_root_path: 'static-test',
|
test_root_path: 'static-test',
|
||||||
cache_path: 'tmp/cache/webpacker',
|
cache_path: 'tmp/cache/webpacker',
|
||||||
resolved_paths: [],
|
resolved_paths: [],
|
||||||
static_assets_extensions: [ '.jpg', '.jpeg', '.png', '.tiff', '.ico', '.svg', '.gif', '.eot', '.otf', '.ttf', '.woff', '.woff2' ],
|
static_assets_extensions: [ '.jpg', '.jpeg', '.png', '.tiff', '.ico', '.svg', '.gif', '.eot', '.otf', '.ttf', '.woff', '.woff2', '.mp3', '.ogg', '.oga' ],
|
||||||
extensions: [ '.mjs', '.js', '.sass', '.scss', '.css', '.module.sass', '.module.scss', '.module.css', '.png', '.svg', '.gif', '.jpeg', '.jpg' ],
|
extensions: [ '.mjs', '.js', '.sass', '.scss', '.css', '.module.sass', '.module.scss', '.module.css', '.png', '.svg', '.gif', '.jpeg', '.jpg' ],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,10 @@ module.exports = merge(sharedConfig, {
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new CompressionPlugin({
|
new CompressionPlugin({
|
||||||
test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/,
|
test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map|mp3|ogg|oga)$/,
|
||||||
|
exclude: [
|
||||||
|
'instance',
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
new BundleAnalyzerPlugin({ // generates report.html
|
new BundleAnalyzerPlugin({ // generates report.html
|
||||||
analyzerMode: 'static',
|
analyzerMode: 'static',
|
||||||
|
|
|
@ -101,6 +101,12 @@ module.exports = {
|
||||||
}, {
|
}, {
|
||||||
from: join(__dirname, '../node_modules/emoji-datasource/img/twitter/sheets/32.png'),
|
from: join(__dirname, '../node_modules/emoji-datasource/img/twitter/sheets/32.png'),
|
||||||
to: join(output.path, 'emoji/sheet_13.png'),
|
to: join(output.path, 'emoji/sheet_13.png'),
|
||||||
|
}, {
|
||||||
|
from: join(__dirname, '../app/sounds'),
|
||||||
|
to: join(output.path, 'sounds'),
|
||||||
|
}, {
|
||||||
|
from: join(__dirname, '../app/instance'),
|
||||||
|
to: join(output.path, 'instance'),
|
||||||
}],
|
}],
|
||||||
options: {
|
options: {
|
||||||
concurrency: 100,
|
concurrency: 100,
|
||||||
|
|
Loading…
Reference in a new issue