For questions please post on Stack Overflow and use the 'webpack' tag (http://stackoverflow.com/tags/webpack).
sokra on main
chore: add bugs field in packag… Merge pull request #15940 from … (compare)
sokra on main
ci: update github actions Merge pull request #15834 from … (compare)
sokra on main
fix: hmr build twice fix registry Merge pull request #15909 from … (compare)
sokra on main
enhanced-resolve@5.10.0 Merge pull request #16001 from … (compare)
sokra on up-enhanced-resolve
sokra on main
remove unnecessary moduleId pro… Merge pull request #16005 from … (compare)
sokra on moduleId-prop
/Users/afrozalam/Code/mt-coaching-ui/node_modules/@mindtickle/mt-ui-components/src/Icon/icon.config.json
this file is just a static map of constants:
{
"ADD": "add",
"ADD2": "add2",
"ADDCOMMENT": "addComment",
"ALERT": "alert",
"ANALYTICS": "Analytics",
"ANNOUNCEMENT": "announcement",
"ARROWUPDOWN": "arrowUpDown",
"ARROWUPRIGHT": "arrowUpRight",
"ASSET": "Asset",
"ATTACHEMENT": "attachement",
"ATTACHMENT": "attachment",
"AUDIO": "audio",
}
coffee-script
, this module is deprecated and points to coffeescript
(no hyphen)
module.exports = [{
mode: 'production',
module: {
rules: [{
test: /\.(jpe?g|gif|png|svg|woff|ttf|wav|mp3)$/i,
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
},
}],
},
}
ERROR in Entry module not found: Error: Can't resolve './src' in '/Users/me/company/assets'
error Command failed with exit code 2.
const buildConfigs = [{
mode: 'development',
plugins: [
new CopyPlugin([{
from: path.join(__dirname, './src/images/'),
to: path.join(__dirname, './dist/images/'),
}]),
],
}
Hi guys, I'm new to webpack, and I'm developing an npm chat package. I can't figure out the correct to make an external dependency. I tried the following for the styled-components
package.
externals: {
"styled-components": {
commonjs: "styled-components",
commonjs2: "styled-components"
}
}
However, when I try importing the package to my main react app. styled-components
is not found in my package build file. I made sure styled-components
is installed on my main react app
--debug
and --display-error-details
; https://webpack.js.org/api/cli/#debug-options
Hi guys,
Presently I am writing an es6 module which I am planning to bundle with webpack. The codebase which I am working on has a large frontend es5 codebase which is bundled outside webpack. I need to be able to use the es6 modules bundled by webpack in the existing es5 codebase.
Is there a way to export modules from webpack bundles to the global namespace?
I know we can use output.library: 'MyModule' for this, but if I have 3 modules A, B and C then using MyModule.A, MyModule.B,... seems a bit clunky.
I would like to send build progress to browser (through webpack-dev-middleware to eventSource) but I don't know how
compiler.apply(new webpack.ProgressPlugin(function(percentage, msg) {
}));
const devMiddleware = require('webpack-dev-middleware')(compiler, {
logLevel: 'silent',
publicPath: '/somePath/'
})
in the browser
const sse = new EventSource('/somePath/') // not sure what I should put here
sse.addEventListener('message', event => onSseMessage(event))