Skip to content

Commit

Permalink
Merge pull request #26 from hepsiburada/fix/regenerator-runtime-error
Browse files Browse the repository at this point in the history
fixed regenerator-runtime
  • Loading branch information
burakilk authored Sep 8, 2021
2 parents 3a6f319 + c06cdba commit f37beca
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"@babel/plugin-proposal-throw-expressions": "7.10.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "7.10.4",
"@babel/polyfill": "7.10.4",
"@babel/preset-env": "7.14.4",
"@babel/preset-react": "7.0.0",
"@researchgate/react-intersection-observer": "1.0.3",
Expand All @@ -45,6 +44,7 @@
"compression": "^1.7.4",
"cookie-parser": "1.4.3",
"copy-webpack-plugin": "4.5.2",
"core-js": "^3.16.3",
"css-loader": "1.0.1",
"eev": "0.1.5",
"esbuild-loader": "^2.11.0",
Expand Down Expand Up @@ -83,6 +83,7 @@
"react-hot-loader": "^4.12.18",
"react-router": "5.1.2",
"react-router-dom": "5.1.2",
"regenerator-runtime": "^0.13.9",
"rimraf": "2.6.2",
"sass-loader": "7.1.0",
"serve-static": "1.14.1",
Expand Down
59 changes: 30 additions & 29 deletions webpack.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const prometheusFile = voltranConfig.monitoring.prometheus;
const chunks = {};

chunks.client = [
'@babel/polyfill/noConflict',
'regenerator-runtime/runtime.js',
'core-js/stable',
'intersection-observer',
path.resolve(__dirname, 'src/client/client.js')
];
Expand Down Expand Up @@ -135,13 +136,13 @@ const clientConfig = webpackMerge(commonConfig, voltranClientConfig, {
use: [
isDebug
? {
loader: 'style-loader',
options: {
insertAt: 'top',
singleton: true,
sourceMap: false
}
loader: 'style-loader',
options: {
insertAt: 'top',
singleton: true,
sourceMap: false
}
}
: MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
Expand All @@ -163,13 +164,13 @@ const clientConfig = webpackMerge(commonConfig, voltranClientConfig, {
use: [
isDebug
? {
loader: 'style-loader',
options: {
insertAt: 'top',
singleton: true,
sourceMap: false
}
loader: 'style-loader',
options: {
insertAt: 'top',
singleton: true,
sourceMap: false
}
}
: MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
Expand All @@ -192,14 +193,14 @@ const clientConfig = webpackMerge(commonConfig, voltranClientConfig, {
},
...(voltranConfig.sassResources
? [
{
loader: 'sass-resources-loader',
options: {
sourceMap: false,
resources: voltranConfig.sassResources
}
{
loader: 'sass-resources-loader',
options: {
sourceMap: false,
resources: voltranConfig.sassResources
}
]
}
]
: [])
]
}
Expand All @@ -225,10 +226,10 @@ const clientConfig = webpackMerge(commonConfig, voltranClientConfig, {
...(isBuildingForCDN
? []
: [
new CleanWebpackPlugin([distFolderPath], {
verbose: true
})
]),
new CleanWebpackPlugin([distFolderPath], {
verbose: true
})
]),

new webpack.DefinePlugin({
'process.env.BROWSER': true,
Expand All @@ -246,11 +247,11 @@ const clientConfig = webpackMerge(commonConfig, voltranClientConfig, {
...(isDebug
? [new webpack.HotModuleReplacementPlugin()]
: [
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id]-[contenthash].css'
})
]),
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id]-[contenthash].css'
})
]),

new AssetsPlugin({
path: voltranConfig.inputFolder,
Expand Down

0 comments on commit f37beca

Please sign in to comment.