mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 10:39:53 +00:00
Revert wepack changes
This commit is contained in:
@@ -38,21 +38,12 @@ module.exports = async function (_, env) {
|
|||||||
return {
|
return {
|
||||||
mode: isProd ? 'production' : 'development',
|
mode: isProd ? 'production' : 'development',
|
||||||
entry: {
|
entry: {
|
||||||
'first-interaction': './src/index',
|
'first-interaction': './src/index'
|
||||||
'sdk': './src/sdk'
|
|
||||||
},
|
},
|
||||||
devtool: isProd ? 'source-map' : 'inline-source-map',
|
devtool: isProd ? 'source-map' : 'inline-source-map',
|
||||||
stats: 'minimal',
|
stats: 'minimal',
|
||||||
output: {
|
output: {
|
||||||
filename: chunkData => {
|
filename: isProd ? '[name].[chunkhash:5].js' : '[name].js',
|
||||||
if(chunkData.chunk.name === 'sdk') {
|
|
||||||
return 'sdk.js';
|
|
||||||
}
|
|
||||||
if(!isProd) {
|
|
||||||
return '[name].js';
|
|
||||||
}
|
|
||||||
return '[name].[chunkhash:5].js'
|
|
||||||
},
|
|
||||||
chunkFilename: '[name].[chunkhash:5].js',
|
chunkFilename: '[name].[chunkhash:5].js',
|
||||||
path: path.join(__dirname, 'build'),
|
path: path.join(__dirname, 'build'),
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
@@ -240,7 +231,7 @@ module.exports = async function (_, env) {
|
|||||||
// For now we're not doing SSR.
|
// For now we're not doing SSR.
|
||||||
new HtmlPlugin({
|
new HtmlPlugin({
|
||||||
filename: path.join(__dirname, 'build/index.html'),
|
filename: path.join(__dirname, 'build/index.html'),
|
||||||
template: isProd ? '!!prerender-loader?string&entry=./src/index!src/index.html' : 'src/index.html',
|
template: isProd ? '!!prerender-loader?string!src/index.html' : 'src/index.html',
|
||||||
minify: isProd && {
|
minify: isProd && {
|
||||||
collapseWhitespace: true,
|
collapseWhitespace: true,
|
||||||
removeScriptTypeAttributes: true,
|
removeScriptTypeAttributes: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user