webpack中文

Webpack Dev Server (webpack-dev-server) Hot Module Replacement (HMR) Not Working

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have gone through many answers on StackOverflow & on GitHub issues as well but, I am still stuck in Hot Module Replacement in Webpack. I am using npm start to run my server with webpack-dev-server --hot --inline . I am trying to change code in my React component, but nothing happens in the browser . I am using Google Chrome Version 49.0.2623.87 (64-bit) on Ubuntu 14.04LTS. In my browser console , I am getting log messages as [HMR] Waiting for update signal from WDS... [WDS] Hot Module Replacement enabled. But, no hot/live reload is

TS2304: cannot find name require and process

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I want to start my angular 2 app using "npm start". I get errors: I tried a lot of "solutions" from internet, but nothing works. My versions: npm - 4.1.2 typings - 2.1.0 node - 7.5.0 tsconfig.json { "compilerOptions": { "target": "es6", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": ["es2015", "dom"], "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true } } polyfills.ts import 'core-js/es6'; import 'core-js/es7/reflect'; require('zone.js

Rules vs Loaders in Webpack - What's the Difference?

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In some Webpack examples, you see reference to a "rules" array: module.exports = { module: { rules: [ { test: /\.scss$/, use: ExtractTextPlugin.extract({ fallback: 'style-loader', //resolve-url-loader may be chained before sass-loader if necessary use: ['css-loader', 'sass-loader'] }) } ] }, plugins: [ new ExtractTextPlugin('style.css') //if you want to pass in options, you can do so: //new ExtractTextPlugin({ // filename: 'style.css' //}) ] } ( https://github.com/webpack-contrib/extract-text-webpack-plugin ) And in other, a loaders array:

Webpack 2: WARNING in .png, .svg, .. DEPRECATED. Configure optipng's optimizationLevel option in it's own options. (optipng.optimizationLevel)

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: This WARNING is printed ~20 times when running webpack - it processes and bundles just fine, but what does it mean? How do I get rid of it? Googling around provides little to no help unfortunately. Here's my webpack config: const ExtractTextPlugin = require ( "extract-text-webpack-plugin" ); var webpack = require ( "webpack" ); module . exports = { entry : { dashboard : './js/main.js' , vendor : [ "fixed-data-table" , "react" , "react-dom" , "jquery" , "bootstrap" , "vis" ,], }, output : { path : "../public" , filename : 'bundle.js

Webpack + Babel: Couldn't find preset “es2015” relative to directory

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a React project using Webpack and Babel. When I created it on an office computer, the Webpack ran fine. When I cloned the project onto my personal computer, it gave the following error: ERROR in ./react_minesweeper.jsx Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/louisstephancruz/Desktop" at /Users/louisstephancruz/Desktop/w6d5/minesweeper/node_modules/babel-core/lib/transformation/file/options/option-manager.js:298:19 at Array.map (native) at OptionManager.resolvePresets (/Users

Invalid configuration object. Webpack has been initialised using a configuration

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As of this morning, with Angular CLI 1.0.0-beta.14 I ng new try3 and ng serve and get the following error: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration has an unknown property 'tslint'. These properties are valid: object { amd?, bail?, cache?, context?, devServer?, devtool?, entry, externals?, loader?, module?, name?, dependencies?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?,

'jquery is not defined' when using webpack to load bootstrap

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am just starting to learn to use Webpack (previously I just use the manual way to include individual scripts separately). And I used bootstrap-loader for loading bootstrap. Here is my webpack.config.js var path = require ( "path" ) var webpack = require ( 'webpack' ) var BundleTracker = require ( 'webpack-bundle-tracker' ) module . exports = { context : __dirname , entry : './assets/js/index' , // entry point of our app. assets/js/index.js should require other js modules and dependencies it needs output : { path : path . resolve

historyApiFallback doesn't work in Webpack dev server

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use Webpack dev server and browserHistory in React Router to manipulate with urls by HTML5 History API. historyapifallback-option does not work in my webpack config file. After refreshing http://localhost:8080/users or http://localhost:8080/products I got 404. webpack.config.js var webpack = require('webpack'); var merge = require('webpack-merge'); const TARGET = process.env.npm_lifecycle_event; var common = { cache: true, debug: true, entry: './src/script/index.jsx', resolve: { extensions: ['', '.js', '.jsx'] }, output: {

$(…).datetimepicker is not a function

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use webpack and want to use bootstrap-datetimepicker . In my webpack config I use ProvidePlugin to get "jquery module". In my code I get error $(...).datetimepicker is not a function when I call $('#datetimepicker12').datetimepicker function. I don't why $ variable doesn't contain datetimepicker function, which should be defined in var datetimepicker = require('eonasdan-bootstrap-datetimepicker'); webpack.config.js var webpack = require('webpack'); var merge = require('webpack-merge'); var NpmInstallPlugin = require('npm-install-webpack

Webpack Missing Module 'Module Not Found'

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm currently working on a react webpack babel etc site and trying to build the first time. The build is successful, but when I open up the browser I get the following error: Uncaught Error: Cannot find module "/Users/michael.nakayama/Documents/Development/jamsesh/node_modules/webpack/node_modules/node-libs-browser/node_modules/process/browser.js" This module exists. Going to that actual url in my browser shows the file in question. But I cannot figure out why webpack cannot find it. I don't know if this is a babel6 issue or a webpack issue,