Webpack

tsconfig.json ignored by Visual Studio Code

烂漫一生 提交于 2021-01-29 03:10:49
问题 I have a tsconfig.json file at the root of my project: { "compilerOptions": { "target": "ES5", "module": "commonjs", "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, "noEmitHelpers": true, "baseUrl": ".", "paths": { "services/*": ["./src/app/shared/services/*"] } }, "compileOnSave": false, "buildOnSave": false, "awesomeTypescriptLoaderOptions": { "forkChecker": true, "useWebpackText": true } } I am trying to define my paths so we don't need to use relative

Modify output of localIdentName / getLocalIdent

纵饮孤独 提交于 2021-01-28 19:30:58
问题 I am developing a widget, which can be embedded on "any" website and using the css-loader to give my CSS-class unique names to avoid conflicts. In my webpack.config.js I have the following line: localIdentName: 'productname-[folder]-[local]', This outputs classnames like: productname-src-widgetbox productname-Sidebar-sidebar Is it possible to remove all "-src" from the classnames and lowercase everything? I found a solution, where I just copied the whole original getLocalIdent() and prepended

Modify output of localIdentName / getLocalIdent

好久不见. 提交于 2021-01-28 19:20:36
问题 I am developing a widget, which can be embedded on "any" website and using the css-loader to give my CSS-class unique names to avoid conflicts. In my webpack.config.js I have the following line: localIdentName: 'productname-[folder]-[local]', This outputs classnames like: productname-src-widgetbox productname-Sidebar-sidebar Is it possible to remove all "-src" from the classnames and lowercase everything? I found a solution, where I just copied the whole original getLocalIdent() and prepended

Bundling a plugin with Rollup but having duplicate Vue.js package imported in the client app's bundle (Nuxt)

…衆ロ難τιáo~ 提交于 2021-01-28 17:49:26
问题 Dear Stack Overflow / Vue.js / Rollup community This could be a noob question for the master plugin developers working with Vue and Rollup. I will write the question very explicitly hoping that it could help other noobs like me in the future. I have simple plugin that helps with form validation. One of the components in this plugin imports Vue in order to programatically create a component and append to DOM on mount like below: import Vue from 'vue' import Notification from './Notification

simplest build system for cytoscape.js?

ε祈祈猫儿з 提交于 2021-01-28 14:08:58
问题 I maintain two R packages which depend on cytoscape.js (cyjShiny and RCyjs). I use webpack and npm to build a bundle, which I then combine with my relatively short R/Javascript wrapper. My problem: I return maybe twice yearly to the packages, rerun webpack, see 1000 modules install, see cryptic error reports concerning deprecated modules. Then webpack runs - which I never really understood - and if problems occur, I scratch my head till I have hacked out a path through my cognitive jungle.

Cannot load Node native addons with webpack

限于喜欢 提交于 2021-01-28 11:41:27
问题 Although I am using vue-cli in the example code to generate a webpack config, nothing is specific to vue. I create the example app like this: vue init webpack webpack_modules_example Generated webpack.base.conf : 'use strict' const path = require('path') const utils = require('./utils') const config = require('../config') const vueLoaderConfig = require('./vue-loader.conf') function resolve (dir) { return path.join(__dirname, '..', dir) } module.exports = { context: path.resolve(__dirname, '.

Why this SVG image from sprite-sheet is not getting rendered in HTML but not in React?

邮差的信 提交于 2021-01-28 11:19:27
问题 I have this code for SVG sprite <symbol xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 22 22" id="github"> <defs> <pattern id="a" preserveAspectRatio="none" width="100%" height="100%" viewBox="0 0 436 428"> <image width="436" height="428" xlink:href="data:image/png;base64,.........."></image> </pattern> </defs> <circle cx="11" cy="11" r="11" fill="#fff"></circle> <path fill="url(#a)" d="M0 0h22v22H0z"></path> </symbol> The GithHub icon is perfectly

Uncaught ReferenceError: global is not defined at Object../node_modules/fbjs/lib/setImmediate.js

狂风中的少年 提交于 2021-01-28 11:00:42
问题 I got this error when I try to render Button from ant design in my Electron project, and it renders nothing instead. When I change from button to just Hello World text, it works. I'm not sure whether the error comes from webpack or the ant design itself. Note: I manually create this project by myself, but the error can be reproduced on https://github.com/Devtography/electron-react-typescript-webpack-boilerplate but no error on https://github.com/Robinfr/electron-react-typescript Error message

How to ignore typescript errors with webpack?

a 夏天 提交于 2021-01-28 10:40:39
问题 My team has been using Angular1 and gulp/systemJS/jspm for several years now. We have been trying to use more Angular2-like features with ngforward (and TypeScript). I've been trying to slowly begin the transition to webpack for our team, but I'm getting a ton of TypeScript compile errors when I try to build. Probably around 1,000, or something crazy like that. They're easy to resolve; errors like not writing "import angular from 'angular'". So, eventually, we hope to go back and fix all of

How to ignore typescript errors with webpack?

ぐ巨炮叔叔 提交于 2021-01-28 10:36:59
问题 My team has been using Angular1 and gulp/systemJS/jspm for several years now. We have been trying to use more Angular2-like features with ngforward (and TypeScript). I've been trying to slowly begin the transition to webpack for our team, but I'm getting a ton of TypeScript compile errors when I try to build. Probably around 1,000, or something crazy like that. They're easy to resolve; errors like not writing "import angular from 'angular'". So, eventually, we hope to go back and fix all of