For questions please post on Stack Overflow and use the 'webpack' tag (http://stackoverflow.com/tags/webpack).
vankop on up-enhanced-resolve
enhanced-resolve@5.10.0 (compare)
vankop on up-enhanced-resolve
enhanced-resolve@5.10.0 (compare)
sokra on main
add concatenate modules side ef… make imports order deterministic improve test case and 1 more (compare)
sokra on add-concatenate-modules-test-case
/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))
hello,
I am trying to load the fonts through vue.config.js. However I am not getting it.
scss
@include font-face(Lato, '/fonts/lato/latoThin', 100, normal, eot woff2 woff svg ttf);
vue.config.js
....
rules: [{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'file-loader',
options: {
name: 'lato/[name].[ext]',
outputPath: 'fonts/'
}
}]
},
if I remove the first slash from the source path, fonts/lato/latoThin
it loads the fonts, but in compile this error appears
* ./fonts/lato/latoThin.eot? in ./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-3-1!./node_modules/postcss-loader/src??ref--8-oneOf-3-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-3-3!./node_module
s/resolve-url-loader!./src/styles/global.scss
and put the bar back in the font path and it works - /fonts/lato/latoThin
Any solution?