License info being included twice after Webpack 4 build
See original GitHub issueNot sure if this is a Webpack issue or something with classnames. The reason I don’t think it is Webpack is because, in the bundled file, no other third party scripts are adding the license info twice.
I thought it was maybe because there is license info in index.js
, bind.js
& dedupe.js
. However, I ruled this out after adding a test change in the copyright text in only index.js
and the change was showing on both license comments in the bundle.
Webpack: v4.8.3 NPM: v5.6.0 Node: v8.1.1
Included below is my Webpack config plus a screen shot of the output.
webpack.config.js
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
mode: 'production',
devtool: "source-maps",
entry: "./src/js/index.tsx",
output: {
path: __dirname + "/dist",
filename: "js/bundle.min.js"
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".json"]
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: [
{
loader: 'ts-loader'
}
]
},
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
use: [{
loader: 'css-loader',
}, {
loader: 'sass-loader'
}],
fallback: 'style-loader'
})
}
]
},
plugins: [
new ExtractTextPlugin({
filename: 'css/bundle.min.css',
allChunks: true,
})
],
externals: {
"react": "React",
"react-dom": "ReactDOM"
},
};
bundle.min.js
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
All my code runs twice when compiled by Webpack
js$/, loaders: ['babel-loader'], include: path.join(__dirname, '../src') } ] } };. javascript · webpack.
Read more >Entry Points - webpack
Single Entry Syntax is a great choice when you are looking to quickly set up a webpack configuration for an application or tool...
Read more >How I solved and debugged my Webpack issue through trial ...
My debugging journey started with the following setup: webpack.config.js // webpack v4.6.0 const path = require('path');const ...
Read more >Micro-frontends: Module Federation with WebPack 5
It allows a JavaScript application to dynamically load code from another application (a different Webpack build). This is how you normally use ...
Read more >Using webpack with TypeScript - LogRocket Blog
Now, we need to add a webpack script that will run the webpack.config.js file for us. ... After running the build command, webpack...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This bug fixed in terser. I think this issue can be closed
This is because
LICENSE.md
is being included, and for whatever reason @JedWatson decided to put the LICENSE prefix in theindex.js
too… hence, twice.I don’t think I want to ping @JedWatson the 1000’s of times necessary to get him to resolve this…