This repository was archived by the owner on Aug 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 161
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
Issue in Webpack production build #259
Copy link
Copy link
Open
Description
In a Webpack production bundle, slideDown on VelocityComponent appears to work fine until the end of the animation, where it sets the height back to 0. There are no errors and I haven't the slightest clue as to what could be causing this. Everything works beautifully in dev mode.
Here's my Webpack config. Hopefully someone has some insight.
const path = require('path')
const TerserPlugin = require('terser-webpack-plugin')
const env = process.env.NODE_ENV
module.exports = {
mode: env || `production`,
devtool: env === `production` ? `source-map` : `eval-source-map`,
entry: {
index: { import: `./Scripts/React/src/index.js`, dependOn: 'shared' },
shared: [
`core-js/es/promise`,
`core-js/es/array/from`,
`whatwg-fetch`,
`velocity-animate`,
],
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'Scripts/React/dist'),
},
// optimization: {
// minimizer: [
// new TerserPlugin({
// terserOptions: {
// output: {
// comments: false,
// },
// },
// sourceMap: true,
// }),
// ],
// },
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
// debug: true,
corejs: 3.6,
useBuiltIns: 'usage',
},
],
['@babel/preset-react'],
],
plugins: ['babel-plugin-styled-components'],
},
},
{
loader: 'eslint-loader',
},
],
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts',
publicPath: '/App/Scripts/React/dist/fonts',
},
},
],
},
],
},
}Metadata
Metadata
Assignees
Labels
No labels