{ "version": "https://jsonfeed.org/version/1", "title": "webpack", "description": "", "home_page_url": "go/webpack", "feed_url": "feed/webpack.json", "icon": "https://cdn.v2ex.com/navatar/9908/279e/988_large.png?m=1496642083", "favicon": "https://cdn.v2ex.com/navatar/9908/279e/988_normal.png?m=1496642083", "items": [ { "author": { "url": "member/justdoit123", "name": "justdoit123", "avatar": "https://cdn.v2ex.com/gravatar/bc725ae9e1d45eb0e54dadc774b5ab96?s=73&d=retro" }, "url": "t/1054232", "title": "[\u524d\u7aef] \u524d\u540e\u7aef\u5206\u79bb\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u5bf9 session \u6709\u4f9d\u8d56\uff0c\u5982\u4f55\u4f18\u96c5\u5904\u7406\uff1f", "id": "t/1054232", "date_published": "2024-07-02T06:26:37+00:00", "content_html": "

\u6709\u4e00\u4e2a\u9875\u9762\u53ca\u5176\u76f8\u5173 api \u9700\u8981\u52a0\u4e0a\u4e00\u4e9b\u4fdd\u62a4\uff0c\u8fd9\u4e9b\u4fdd\u62a4\u7684\u4e0a\u4e0b\u6587\u5b58\u50a8\u5728 server session \u4e2d\u7684\u3002

\n

\u524d\u7aef\u5f00\u53d1\u7684\u65f6\u5019\uff0cwebpack devServer \u8f6c\u53d1\u7684 api \u4f1a\u56e0\u4e3a\u8fc7\u4e0d\u4e86\u8fd9\u4e9b\u4fdd\u62a4\u68c0\u67e5\u800c\u88ab\u62e6\u4e0b\u3002\u4e0d\u77e5\u9053\u5404\u4f4d\u6709\u6ca1\u6709\u6bd4\u8f83\u4f18\u96c5\u7684\u65b9\u6848\uff1f

\n

\u6211\u4eec\u73b0\u5728\u662f\u624b\u52a8\u7684\u628a cookie \u590d\u5236\u5728 localhost \u57df\u540d\u4e0b\u3002

\n" }, { "author": { "url": "member/realJamespond", "name": "realJamespond", "avatar": "https://cdn.v2ex.com/gravatar/5ad087845dfa481ca314d3edab4b163f?s=73&d=retro" }, "url": "t/858169", "title": "\u5982\u4f55\u5728\u7f16\u8bd1\u65f6\u68c0\u6d4b\u662f\u5426\u5f15\u5165\u5f00\u53d1\u7684\u4ee3\u7801", "id": "t/858169", "date_published": "2022-06-08T06:00:50+00:00", "content_html": "

\u6bd4\u5982import './some-dev-code.ts'
\n\u6709\u6ca1\u6709\u4e00\u79cd\u53ef\u80fd, \u5728\u7f16\u8bd1\u671f\u53ef\u4ee5\u68c0\u6d4b\u51fa\u5e76\u76f4\u63a5\u629b\u9519.
\n\u76ee\u524d\u6211\u662f\u5728some-dev-code.ts,\u52a0\u5165\u5224\u65ad process.env.dev \u7136\u540e\u629b\u9519, \u4f46\u662f\u53ea\u80fd\u5728 runtime \u624d\u77e5\u9053...

\n" }, { "author": { "url": "member/yazoox", "name": "yazoox", "avatar": "https://cdn.v2ex.com/avatar/7b39/2690/111562_large.png?m=1635297358" }, "url": "t/854937", "title": "webpack-dev-server \u542f\u52a8 dev server \u540e\uff0c\u5982\u4f55\u8ba9\u5176\u5b83\u7684\u673a\u5668\u53ef\u4ee5\u8bbf\u95ee\u8be5 server?", "id": "t/854937", "date_published": "2022-05-24T04:27:20+00:00", "content_html": "

\u4e3b\u8981\u662f\u4e3a\u4e86\u8c03\u8bd5\u65b9\u4fbf\u3002

\n

\u672c\u5730 IP: 198.0.1.2\n\u9632\u706b\u5899\u5df2\u7ecf\u5173\u95ed

\n

\u7136\u540e\u7528 webpack-dev-server \u542f\u52a8\u540e\uff0c\u7aef\u53e3\u662f 8080. \u672c\u5730\u8bbf\u95ee\uff1a http://locahost:8080/\u53ef\u4ee5\u6210\u529f

\n

\u53e6\u5916\u4e00\u53f0\u673a\u5668 198.0.1.10 \u8bbf\u95ee http://198.0.1.2:8080 \u63d0\u793a\u6211

\n
This site can\u2019t be reached\n198.0.1.2 refused to connect.\n
\n

\u6211\u6dfb\u52a0\u4e86\u542f\u52a8\u53c2\u6570\uff0c\u6bd4\u5982\uff1a--public 0.0.0.0:8080 \uff08\u6216\u8005 --public 198.0.1.2:8080 \uff09\u770b\u547d\u4ee4\u884c\uff0c\u63d0\u793a server \u542f\u52a8\u6210\u529f\uff0c\u4f46\u662f\u5728\u6d4f\u89c8\u5668\u91cc\u9762\u8f93\u5165 http://0.0.0.0:8080 \u76f4\u63a5\u63d0\u793a\u6211\u9519\u8bef\uff08\u5c31\u66f4\u522b\u63d0\u8fdc\u7a0b\u8bbf\u95ee\u4e86\uff09

\n
This site can\u2019t be reached\nThe webpage at http://0.0.0.0:8080/ might be temporarily down or it may have moved permanently to a new web address.\n
\n

google \u4e86\u4e00\u4e0b\uff0c\u4ec0\u4e48 allowedHosts \uff0cdisableHostCheck \u53c2\u6570\u4e5f\u8bbe\u7f6e\u4e86\uff0c\u8c8c\u4f3c\u6ca1\u6709\u5565\u7528\u3002
\np.s. refer to:
\nhttps://github.com/webpack/webpack-dev-server/issues/882

\n" }, { "author": { "url": "member/yazoox", "name": "yazoox", "avatar": "https://cdn.v2ex.com/avatar/7b39/2690/111562_large.png?m=1635297358" }, "url": "t/842684", "title": "webpack.config.js \u5728 exports \u914d\u7f6e\u4e4b\u524d\uff0c\u80fd\u5148\u6267\u884c\u4e00\u6bb5\u5f02\u6b65\u4ee3\u7801\u5230\uff1f", "id": "t/842684", "date_published": "2022-03-24T10:34:18+00:00", "content_html": "

\u6211\u60f3\u5148\u6267\u884c\u4e00\u6bb5\u5f02\u6b65\u4ee3\u7801\uff0c\u5982\u4e0b\uff0c\u628a commitHash \u5199\u5165\u5230 process.env \u91cc\u9762\u53bb\uff0c\u7136\u540e\u518d\u8fd4\u56de webpack \u7684\u914d\u7f6e\uff1a

\n
async function getLastCommitHash() {\n return new Promise(resolve => {\n require('child_process').exec('git rev-parse HEAD', function(err, stdout) {\n resolve(stdout);\n });\n }\n}\n\nconst run = async () => {\nconst commit = await getLastCommitHash();\nreturn\n {\n ...\n plugins: new webpack.DefinePlugin({\n \"process.env\": commit\n })\n\n }\n}\n\n
\n

\u6211\u53c2\u8003\u4e86\u4e00\u4e0b\u8fd9\u91cc\u7684\u505a\u6cd5\uff1a\nhttps://stackoverflow.com/questions/53991856/how-do-i-await-a-piece-of-code-within-weback-config

\n

module.exports = run(); \u6216\u8005
\nmodule.exports = run;\n\u8c8c\u4f3c\u90fd\u4e0d\u884c\u3002

\n

\u8fd9\uff0c\u6709\u6ca1\u6709\u529e\u6cd5\uff0c\u5728 webpack.config.js \u91cc\u9762\uff0c\u5148\u6267\u884c\u4e00\u6bb5\u5f02\u6b65\u4ee3\u7801\u518d\u8fd4\u56de\u914d\u7f6e\u5462\uff1f

\n" }, { "author": { "url": "member/zy0829", "name": "zy0829", "avatar": "https://cdn.v2ex.com/gravatar/79dd8e37b9402a68590f9a6db48b8a11?s=73&d=retro" }, "url": "t/834542", "title": "webpack \u5173\u4e8e\u4f9d\u8d56\u63d0\u53d6\u7684 build \u5dee\u5f02", "id": "t/834542", "date_published": "2022-02-17T08:10:14+00:00", "content_html": "

\u6587\u4ef6 A.js \u5f15\u5165\u4e86\u4f9d\u8d56 dep.js \uff0c\u7136\u540e\u53c8\u52a8\u6001\u52a0\u8f7d\u4e86 import('bjs, cjs') , \u8fd9\u4e24\u4e2a\u6587\u4ef6 bjs cjs \u4e5f\u90fd\u5f15\u5165\u4e86 dep.js

\n

\u5f53\u6211\u914d\u7f6e\u4e86 splitChunks, chunks: all, minChunks:2 \u7684\u60c5\u51b5\u4e0b dep.js \u5e76\u6ca1\u6709\u88ab\u5355\u72ec\u63d0\u53d6\u51fa\u6765

\n

\u5982\u679c A.js \u6ca1\u6709\u5f15\u5165\u4f9d\u8d56 dep.js \u7f16\u8bd1\u540e dep.js \u5c31\u80fd\u88ab\u5355\u72ec\u63d0\u53d6\u51fa\u6765\uff0c\u8fd9\u662f\u4e3a\u5565

\n" }, { "author": { "url": "member/yazoox", "name": "yazoox", "avatar": "https://cdn.v2ex.com/avatar/7b39/2690/111562_large.png?m=1635297358" }, "url": "t/830419", "title": "webpack \u91cc\u9762 definePlugin \u91cc\u9762\u5b9a\u4e49\u4e86\u4e00\u4e9b process.env \u7684\u53d8\u91cf\uff0c\u8fd9\u4e2a\u662f\u5982\u4f55\u5e94\u7528\u5230 runtime \u73af\u5883\u7684\uff1f", "id": "t/830419", "date_published": "2022-01-25T02:35:35+00:00", "content_html": "

\u6211\u7684\u7406\u89e3\uff0cwebpack \u662f\u4e2a\u6253\u5305\u5de5\u5177\uff0c\u662f\u5728 compile \u9636\u6bb5\u3002\n\u6253\u5305\u597d\u4ee5\u540e\uff0c\u628a bundle \u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u6bd4\u5982 aws \u4e0a\u9762\uff0c\u8fd0\u884c\u540e\uff0c\u662f\u600e\u4e48\u5e94\u7528\u8fd9\u4e9b process.env \u7684\uff1f

\n

\u662f webpack \u6253\u5305\u65f6\uff0c\u628a process.env \u751f\u6210\u4e86\u4e00\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u5728 runtime \u518d\u628a\u8fd9\u4e9b variables \u4ece\u6587\u4ef6\u91cc\u9762\u8bfb\u53d6\u51fa\u6765\u4e86\u4e48\uff1f

\n

\u6211 google \u4e86\u4e00\u4e0b\uff0c\u627e\u76f8\u5173\u6587\u6863\uff0c\u6ca1\u6709\u627e\u5230\u3002

\n" }, { "author": { "url": "member/yazoox", "name": "yazoox", "avatar": "https://cdn.v2ex.com/avatar/7b39/2690/111562_large.png?m=1635297358" }, "url": "t/811530", "title": "webpack \u73b0\u5728\u4f9d\u7136\u4e0d\u80fd\u81ea\u52a8\u652f\u6301 tree-shaking\uff0c\u6765\u4f18\u5316\u5f15\u5165\u7684\u5305\u4e48\uff1f", "id": "t/811530", "date_published": "2021-10-29T06:42:16+00:00", "content_html": "

https://www.jianshu.com/p/7994b1fc6dfe

\n

\u8bfb\u5230\u4e00\u7bc7\u6587\u7ae0\uff0c\u63d0\u5230\u4e86\uff0cwebpack \u5982\u679c\u60f3\u5728\u5f15\u5165\u4e00\u4e2a\u5305\u7684\u65f6\u5019\uff0c\u7f16\u8bd1\u53ea\u5f15\u5165\u7684\u90a3\u90e8\u5206\u4ee3\u7801\uff0c\u9700\u8981 babel \u7684\u652f\u6301\u3002\u800c\u4e14\uff0c\u53ea\u5bf9\u81ea\u5df1\u7684\u4ee3\u7801\u6709\u6548\u3002\u5982\u679c\u662f\u7b2c\u4e09\u65b9\u7684\u5305\uff0c\u8fd8\u4e0d\u884c\uff0c\u5f97\u5199\u4e00\u4e2a\u63d2\u4ef6\uff0c\u5b9e\u73b0\u8f6c\u6362\u3002\u6bd4\u5982\uff0c

\n
import { x } from 'module1';\n\n\u8f6c\u6362\u6210\n\nimport { x } from 'module1/a/bc';\n\n
\n

\u8981\u8fd9\u4e48\u9ebb\u70e6\u624d\u80fd\u591f\u5b9e\u73b0 tree-shaking \u554a\uff01

\n

\u5f53\u7136\u8fd9\u662f 3 \u5e74\u524d\u7684\u6587\u7ae0\u4e86\uff0c\u73b0\u5728\u7684 webpack \u4e5f\u8fdb\u5316\u5230\u4e86 5.0 \u7684\u7248\u672c\u4e86\u5427\uff1f\u73b0\u5728\u8fd8\u662f\u8fd9\u6837\u7684\u4e48\uff1f

\n" }, { "author": { "url": "member/SystemLight", "name": "SystemLight", "avatar": "https://cdn.v2ex.com/avatar/daf0/50fc/439445_large.png?m=1567520788" }, "url": "t/746431", "title": "webpack5 \u6253\u5305\u540e\u4e3a\u4f55\u6700\u5916\u5c42\u4f7f\u7528\u7684\u662f\u7bad\u5934\u51fd\u6570\u5305\u88f9\uff0c\u80fd\u5426\u53bb\u6389\uff1f", "id": "t/746431", "date_published": "2021-01-19T12:12:23+00:00", "content_html": "

webpack5 \u6253\u5305\u540e\u5982\u4e0b\uff0c\u5e76\u975e babel \u914d\u7f6e\u95ee\u9898\uff0c\u5305\u88f9\u5185\u7684\u4ee3\u7801\u6ca1\u6709\u95ee\u9898\u3002

\n
(()=>{\"use strict\";console.log(\"hello\")})();\n
\n" }, { "author": { "url": "member/SystemLight", "name": "SystemLight", "avatar": "https://cdn.v2ex.com/avatar/daf0/50fc/439445_large.png?m=1567520788" }, "url": "t/740236", "title": "\u4e3a\u4ec0\u4e48\u8d77\u4e2a\u7a7a\u9879\u76ee\u914d\u7f6e webpack \u7f16\u8bd1\u7684\u901f\u5ea6\u4e0d\u5982 create-react-app \u521b\u5efa\u7684\u9879\u76ee\u5feb\uff1f", "id": "t/740236", "date_published": "2020-12-30T02:51:28+00:00", "content_html": "
    \n
  1. create-react-app \u5bf9\u7f16\u8bd1\u505a\u4e86\u4ec0\u4e48\u4f18\u5316\u4e48\uff1f
  2. \n
  3. ts-loader \u5f88\u62d6\u7f16\u8bd1\u65f6\u5e38\uff0c\u5e94\u8be5\u5982\u4f55\u89e3\u51b3
  4. \n
\n" }, { "author": { "url": "member/wszgrcy", "name": "wszgrcy", "avatar": "https://cdn.v2ex.com/gravatar/580faa0c768668e7325c10e06f49aefc?s=73&d=retro" }, "url": "t/713884", "title": "\u95ee\u4e0b\u5927\u4f6c\u4eec,webpack \u7684\u52a8\u6001\u5bfc\u5165\u600e\u4e48\u5b9e\u73b0\u6bd4\u8f83\u597d?", "id": "t/713884", "date_published": "2020-10-11T03:29:05+00:00", "content_html": "

\u4e0d\u662f import \u6216\u8005\u8bf4\u4e0d\u662f\u4f60\u4eec\u60f3\u7684 import

\n\n

\u5982\u4f55\u5b9e\u73b0\u771f\u6b63\u7684\u52a8\u6001?

\n\n

\u662f\u5426\u9700\u8981\u5176\u4ed6\u7684\u914d\u7f6e\u914d\u5408

\n\n

\u4e0d\u77e5\u9053\u5927\u4f6c\u4eec\u6709\u6ca1\u6709\u8fd9\u79cd\u6280\u672f,\u5e2e\u5fd9\u63d0\u4e2a\u9192\u5c31\u884c\u4e86

\n" }, { "author": { "url": "member/w3cfed", "name": "w3cfed", "avatar": "https://cdn.v2ex.com/avatar/6d85/b568/485827_large.png?m=1655710134" }, "url": "t/702367", "title": "\u4f60\u771f\u7684\u7406\u89e3 Webpack\uff1f\u8bf7\u56de\u7b54\u4e0b\u5217\u95ee\u9898\u3002", "id": "t/702367", "date_published": "2020-08-29T02:59:28+00:00", "content_html": "

\"\u4f60\u771f\u7684\u7406\u89e3

\n
\n

\u4f60\u771f\u7684\u7406\u89e3 Webpack \uff1f \u5982\u679c\u77e5\u9053\u4ee5\u4e0b\u95ee\u9898\u7684\u7b54\u6848\uff0c\u5219\u610f\u5473\u7740\u5df2\u7ecf\u638c\u63e1\u4e86 Webpack\u3002 \u6b22\u8fce\u63d0\u4f9b\u60a8\u7684\u7b54\u6848\u3002

\n
\n\n

Webpack \u5b9e\u6218

\n\n

Webpack \u539f\u7406

\n\n

Webpack 5

\n\n" }, { "author": { "url": "member/maryshaw", "name": "maryshaw", "avatar": "https://cdn.v2ex.com/gravatar/a2a854e3d6290485dc95aad539b56138?s=73&d=retro" }, "url": "t/695090", "title": "webpack \u90a3\u4e48\u725b\u903c\u3002\u5982\u679c\u53ea\u662f\u5199 vue \u7684\u8bdd\uff0c\u53ea\u662f\u4e0d\u662f\u53ea\u8981 vue cli \u5c31\u591f\u4e86\u3002", "id": "t/695090", "date_published": "2020-08-02T13:34:31+00:00", "content_html": "

\u6682\u65f6\u89c9\u5f97\u6ca1\u6709\u7528\u5230 webpack \u7684\u673a\u4f1a\u2026\u2026\u4f60\u4eec\u5728\u4ec0\u4e48\u65f6\u5019\u7528\u5230 webpack \u3002

\n" }, { "author": { "url": "member/duanzs", "name": "duanzs", "avatar": "https://cdn.v2ex.com/avatar/bd1a/d699/326849_large.png?m=1608540841" }, "url": "t/678715", "title": "\u4e3a\u4ec0\u4e48 vue \u9879\u76ee\u6728\u6253\u5305\u540e\u5fc5\u987b\u90e8\u7f72\u5728\u670d\u52a1\u5668\u6216\u672c\u5730\u8d77\u4e00\u4e2a web \u670d\u52a1\u624d\u80fd\u8fd0\u884c\uff1f", "id": "t/678715", "date_published": "2020-06-04T12:34:29+00:00", "content_html": "

\u6211\u81ea\u5df1\u7f16\u5199 html \u6587\u4ef6\uff0c\u53ef\u4ee5\u76f4\u63a5\u7528\u6d4f\u89c8\u5668\u6253\u5f00\uff0c\u4f46\u662f\u7528 vue \u9879\u76ee\u6253\u5305\u540e\u76f4\u63a5\u7528\u6d4f\u89c8\u5668\u6253\u5f00 index.html \u5c31\u6253\u4e0d\u5f00\uff08\u767d\u6846\uff09

\n" }, { "author": { "url": "member/Shook", "name": "Shook", "avatar": "https://cdn.v2ex.com/avatar/9d75/9d16/360944_large.png?m=1544542609" }, "url": "t/668970", "date_modified": "2020-05-06T08:12:30+00:00", "content_html": "

\u6bd4\u5982\u6211\u6709\u4e00\u4e2a main.js\uff1a

\n
define([\n\tconfig, // ./config.js\n\tJApp, // ./modules/module-common/app.js\n], function(config, JApp) {\n\t...\n});\n
\n

\u540c\u65f6\uff0c\u6211\u8fd8\u6709\u4e2a config \u6587\u4ef6\uff1a

\n
define([], function() {\n\treturn {\n\t\tconfig: 'config',\n\t\tJApp: './modules/module-common/app',\n\t\tHApp: './modules/module-common/app.html',\n\t};\n});\n
\n

\u6211\u5728\u5c1d\u8bd5\u4f7f\u7528 webpack \u6253\u5305 main.js \u65f6\uff0cwebpack \u4f1a\u63d0\u793a\u627e\u4e0d\u5230\u6a21\u5757\u2018JApp\u2019\uff0c\u56e0\u4e3a\u786e\u5b9e\u4e0d\u5b58\u5728\u561b\u3002\n\u4e8e\u662f\u6211\u5c31\u914d\u7f6e\u4e86\u4e00\u4e0b webpack.resolve.alias\uff0c\u5c31\u662f\u76f4\u63a5\u5c06 config \u6587\u4ef6\u7684\u5185\u5bb9\u8d4b\u7ed9 webpack.resolve.alias \u3002\n\u4f46\u7ed3\u679c\u662f\u4ecd\u65e7\u62a5\u9519\uff1a

\n
\n

Module not found: Error: Can't resolve 'JApp' in 'D:\\codes\\webpack\\webpack-test\\webapp\\static'\n@ ../webapp/static/main.js 13:4-227:6

\n
\n

\u6211\u8be5\u600e\u4e48\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u5462\uff1f

\n", "date_published": "2020-05-06T08:12:14+00:00", "title": "Webpack \u4e2d\u5982\u4f55\u5173\u8054 AMD \u6a21\u5757\u7684\u4f9d\u8d56\u6620\u5c04\uff1f", "id": "t/668970" }, { "author": { "url": "member/duanzs", "name": "duanzs", "avatar": "https://cdn.v2ex.com/avatar/bd1a/d699/326849_large.png?m=1608540841" }, "url": "t/620733", "title": "vue \u7f16\u8bd1\u540e\u5982\u4f55\u5d4c\u5165\u5230\u7c7b\u4f3c jsp \u8001\u7cfb\u7edf\u4e2d\uff1f", "id": "t/620733", "date_published": "2019-11-18T09:11:38+00:00", "content_html": "

\u80cc\u666f\uff1a\u4e00\u4e2a\u8001\u9879\u76ee\uff0c\u524d\u540e\u7aef\u672a\u5206\u79bb\uff0c\u524d\u7aef\u7528\u7684\u7c7b\u4f3c jsp \u8fd9\u79cd\u6280\u672f\uff0c\u548c\u540e\u7aef\u662f\u4e00\u671f\u6253\u5305\u53d1\u5e03\u3002\u73b0\u5728\u8981\u505a\u4e00\u4e2a\u5927\u9700\u6c42\u6a21\u5757\uff0c\u548c\u539f\u6765\u7cfb\u7edf\u6709\u5173\u8054\uff0c\u4f46\u4e0d\u662f\u5f88\u5927\uff0c\u60f3\u4f7f\u7528 vue\uff0cjsp \u8fd9\u79cd\u6280\u672f\u5df2\u7ecf\u4e0d\u8003\u8651\u7684\uff0c\u5f00\u53d1\u592a\u6162\u4e86\u3002

\n

\u624b\u6bb5\uff1a\u65b0\u6a21\u5757\u5355\u72ec\u8d77\u4e2a\u5de5\u7a0b\uff0c\u91c7\u7528 vue \u5f00\u53d1\u3002\u5728\u8001\u7cfb\u7edf\u65b0\u589e\u4e00\u4e2a\u83dc\u5355 /\u76ee\u5f55\uff0c\u65b0\u6a21\u5757\u7f16\u8bd1\u597d\u5c06\u6587\u4ef6\u653e\u7f6e\u8001\u7cfb\u7edf\u5bf9\u5e94\u76ee\u5f55\uff0c\u7136\u540e\u8001\u7cfb\u7edf\u5411\u4ee5\u524d\u4e00\u6837\u968f\u540e\u7aef\u4e00\u671f\u6253\u5305\u90e8\u7f72\u3002

\n

\u95ee\u9898\uff1a\u5982\u4f55\u6253\u5305 vue \u5de5\u7a0b\uff0c\u7f16\u8bd1\u597d\u53c8\u5982\u4f55\u5d4c\u5165\u8001\u7cfb\u7edf?

\n

\u5426\u5b9a\u65b9\u6848\uff1a\u65b0\u7cfb\u7edf\u5355\u72ec\u90e8\u7f72\u4e00\u5957\u73af\u5883\uff0c\u7136\u540e\u7528 frame \u5f04\u4e2a\u7a97\u53e3\u3002\u8fd9\u79cd\u65b9\u6848\u88ab\u5426\u5b9a\u4e86\uff0c\u56e0\u4e3a\u9700\u8981\u65b0\u90e8\u7f72\u73af\u5883\uff01

\n" }, { "author": { "url": "member/mashirozx", "name": "mashirozx", "avatar": "https://cdn.v2ex.com/avatar/e81d/4d72/233876_large.png?m=1648484276" }, "url": "t/616204", "date_modified": "2019-11-04T11:32:15+00:00", "content_html": "

webpack-dev-serer \u8c03\u8bd5\u7684\u65f6\u5019\uff0cbundle.css \u91cc\u9762\u67d0\u4e2a\u8d44\u6e90\u8def\u5f84\u662f url(../dist/images/wave.svg)\uff0c\u4f46\u662f\u7b49\u6211 npm run build \u6784\u5efa\u51fa\u6765\u7684 bundle.css \u91cc\u9762\u8d44\u6e90\u8def\u5f84\u5374\u53d8\u6210\u4e86 url(../../dist/images/wave.svg)\uff0c\u767e\u601d\u4e0d\u5f97\u5176\u89e3\u554a\u3002\u3002\u3002

\n

\u9879\u76ee\u53ca webpack.config.js \u5728\u8fd9\u91cc\uff08 Github \uff09\u3002

\n

\"image\"

\n", "date_published": "2019-11-04T11:31:46+00:00", "title": "Webpack build \u51fa\u6765\u7684 CSS \u5185\u8d44\u6e90\u8def\u5f84\u4e0e dev-server \u8c03\u8bd5\u7684\u65f6\u5019\u4e0d\u4e00\u6837\uff1f", "id": "t/616204" }, { "author": { "url": "member/e8c47a0d", "name": "e8c47a0d", "avatar": "https://cdn.v2ex.com/avatar/d477/5646/180258_large.png?m=1467619761" }, "url": "t/481035", "title": "\u4e0d\u4e86\u89e3 WebAssembly \u548c webpack \u7684\u5173\u8054", "id": "t/481035", "date_published": "2018-08-18T12:22:05+00:00", "content_html": "\u76f4\u89c9\u4e0a\u7684\u7406\u89e3\u662f\uff0c\u4eca\u540e\u6253\u5305\u540e\u7684\u5c31\u4e0d\u662f js \u800c\u662f wasm \uff1f\u8fd8\u662f\u6211\u7406\u89e3\u9519\u4e86\u2026\u2026\uff1f" }, { "author": { "url": "member/clino", "name": "clino", "avatar": "https://cdn.v2ex.com/avatar/6c1d/a886/1368_large.png?m=1335068029" }, "url": "t/463160", "title": "webpack \u5de5\u7a0b\u5316\u548c vue \u5355\u6587\u4ef6\u7ec4\u4ef6\u5f00\u53d1\u4f8b\u5b50\u9879\u76ee", "id": "t/463160", "date_published": "2018-06-14T09:32:11+00:00", "content_html": "

https://github.com/zhangchunlin/webpack_tutorial

\n

\u60f3\u5b66\u4e60 webpack \u5de5\u7a0b\u5316\u548c vue \u5355\u6587\u4ef6\u7ec4\u4ef6\u5f00\u53d1\u7684\u65b0\u624b\u53ef\u4ee5\u770b\u770b

\n

\u6765\u6e90:

\n\n

\u5185\u5bb9:

\n\n" }, { "author": { "url": "member/jacktesla", "name": "jacktesla", "avatar": "https://cdn.v2ex.com/gravatar/8e0073cf1aaeba59cde0621159611d8e?s=73&d=retro" }, "url": "t/455201", "date_modified": "2022-02-06T20:23:48+00:00", "content_html": "

\u5c0f\u5f1f\u6211\u73b0\u5728\u4f7f\u7528 webpack+dva+wind \u914d\u7f6e\u4e00\u4e2a\u591a\u9875\u9762\u5e94\u7528\uff0c\u539f\u5148\u4f7f\u7528 sever \u5b9e\u73b0\u70ed\u66f4\u65b0\uff0c\u4f46\u662f\u73b0\u5728\u591a\u9875\u9762\u600e\u4e48\u5b9e\u73b0\u70ed\u66f4\u65b0\u6216\u8005\u65b9\u4fbf\u5f00\u53d1\u7684\u65b9\u6cd5\u3002\u6709\u5927\u795e\u6709\u5173\u4e8e\u914d\u7f6e webpack+dva \u7684\u9879\u76ee\uff0c\u53ef\u4ee5\u501f\u6211\u501f\u9274\u4e0b\u5417\uff0c\u4e0d\u80dc\u611f\u6fc0\u3002

\n", "date_published": "2018-05-16T02:38:46+00:00", "title": "\u5173\u4e8e webpack \u914d\u7f6e\u591a\u9875\u9762\u4e4b\u540e\u7684\u70ed\u66f4\u65b0\u95ee\u9898", "id": "t/455201" }, { "author": { "url": "member/de6ugger", "name": "de6ugger", "avatar": "https://cdn.v2ex.com/gravatar/997bbd42887163685df7ed1b909e5ee3?s=73&d=retro" }, "url": "t/383424", "title": "\u5173\u4e8e webpack-dev-server \u7684\u914d\u7f6e\u95ee\u9898", "id": "t/383424", "date_published": "2017-08-16T08:35:23+00:00", "content_html": "

\u76f4\u63a5\u7528\u7684\u6700\u65b0\u7684 iview \u9879\u76ee\u3002

\n

\u5148\u6267\u884c npm run dist \u751f\u6210\u4e86 dist \u6587\u4ef6\u5939\uff0c

\n

\u7136\u540e\u60f3\u901a\u8fc7 npm run dev \u67e5\u770b example \u4e2d\u7684\u6548\u679c\uff0c

\n

\u7ed3\u679c css \u6b7b\u6d3b\u627e\u4e0d\u5230\uff0cindex.html \u4e2d\u7684 css \u6307\u5411\u81ea\u5df1\u4fee\u6539\u8fc7\uff0c

\n

\u5e94\u8be5\u662f\u548c webpack-dev-server \u7684\u914d\u7f6e\u6709\u5173\u7684\u5427\uff1f

\n

\u524d\u7aef\u5c0f\u83dc\u524d\u6765\u8bf7\u5927\u4f6c\u4eec\u5e2e\u6211\u6307\u5bfc\u4e00\u4e0b\u3002\n\u4e0d\u80dc\u611f\u6fc0\u3002

\n

\"\"\n\"\"

\n" }, { "author": { "url": "member/ghostheaven", "name": "ghostheaven", "avatar": "https://cdn.v2ex.com/gravatar/aa096242e01509440346de42356751b7?s=73&d=retro" }, "url": "t/373974", "title": "webpack \u7684\u5b98\u65b9 node-loader \u662f\u653e\u5f03\u6cbb\u7597\u4e86\u5417", "id": "t/373974", "date_published": "2017-07-08T12:21:16+00:00", "content_html": "\u6253\u5305\u540e\u5c45\u7136\u7528\u7684\u662f native module \u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u8fd9\u662f\u653e\u5f03\u6cbb\u7597\u4e86\u5417\uff1f\r
\r
\u5e78\u597d\u8fd8\u6709\u4e2a node-native-loader \u53ef\u4ee5\u7528" }, { "author": { "url": "member/lxy", "name": "lxy", "avatar": "https://cdn.v2ex.com/gravatar/b657ab399e8be52cec2a2867bbc4f662?s=73&d=retro" }, "url": "t/366900", "title": "\u53ea\u7f16\u8bd1 Pug \u65f6\u914d\u7f6e\u5e94\u8be5\u600e\u4e48\u5199\uff1f", "id": "t/366900", "date_published": "2017-06-08T03:47:26+00:00", "content_html": "\u65b0\u624b\u3002Webpack \u8981\u6c42\u6709 entry\uff0c\u4f46\u662f\u6211\u6682\u65f6\u6ca1\u5199\u4efb\u4f55 js \u6587\u4ef6\uff0c\u6307\u5b9a\u5165\u53e3\u6ca1\u4ec0\u4e48\u610f\u4e49\uff0c\u5728\u5355\u7eaf\u53ea\u7f16\u8bd1\u4e00\u5806 Pug \u6587\u4ef6\u65f6\u914d\u7f6e\u5e94\u8be5\u600e\u4e48\u5199\uff1f" }, { "author": { "url": "member/dxcqcv", "name": "dxcqcv", "avatar": "https://cdn.v2ex.com/gravatar/217c4134e1eb90183a637bf0874b0a2b?s=73&d=retro" }, "url": "t/364698", "date_modified": "2017-06-05T06:37:14+00:00", "content_html": "

\u95ee\u9898\u4e00\nwebpack \u6253\u5305\u51fa\u6765\u7684 js \u5982\u4f55\u6253\u65ad\u70b9 debug \uff1f\u5df2\u7ecf\u5f00\u542f sourcemap

\n

\u5f15\u7533\u95ee\u9898\uff0c\u5982\u679c\u662f webpack-dev-server \u91cc\u7684 js \u56e0\u4e3a\u662f\u5728\u5185\u5b58\u4e2d\u662f\u4e0d\u662f\u66f4\u65e0\u6cd5 debug \u6253\u65ad\u70b9\u4e86\uff1f

\n

\u95ee\u9898\u4e8c\nfirefox \u5347\u7ea7\u5230 53 \u540e\uff0credux-devtools-extension \u65e0\u6cd5\u8c03\u51fa\u662f\u4e0d\u662f\u666e\u904d\u73b0\u8c61\uff1f\u6839\u672c\u627e\u4e0d\u5230\u90a3\u4e2a\u8f6e\u56de\u773c\u7684 icon \u4e86\uff0c\u662f\u4e0d\u662f\u56e0\u4e3a\u5f00\u542f\u4e86 firefox \u7684\u667a\u80fd\u641c\u7d22\u63d0\u793a\u5462\uff1f

\n

\u8c22\u8c22\u5927\u5bb6

\n", "date_published": "2017-05-30T02:48:11+00:00", "title": "webpack \u548c redux \u8c03\u8bd5\u95ee\u9898", "id": "t/364698" }, { "author": { "url": "member/simonlify", "name": "simonlify", "avatar": "https://cdn.v2ex.com/avatar/6bc8/4d2b/146207_large.png?m=1467171608" }, "url": "t/294146", "date_modified": "2017-06-05T06:37:46+00:00", "content_html": "\u672c\u4eba\u6700\u8fd1\u5728\u5b66 React+webpack+ES6 \u7684\u524d\u7aef\u9879\u76ee\u7ec4\u4ef6\u5316\u5f00\u53d1\uff0c\u4f46\u662f\u5728\u7528 npm \u7f16\u8bd1 webpack \u7684\u914d\u7f6e\u6587\u4ef6\u65f6\u78b0\u5230\u4e86\u5982\u4e0b\u9519\u8bef\uff0c webpack.config.js alias \u914d\u7f6e\u5982\u4e0b\uff1a\r
\r
\u90e8\u5206\u4ee3\u7801\uff1a\r
var alias = pickFiles({\r
id: /(conf\\/[^\\/]+).js$/,\r
pattern: SRC_PATH + '/conf/*.js'\r
});\r
\r
alias = Object.assign(alias, pickFiles({\r
id: /(components\\/[^\\/]+)/,\r
pattern: SRC_PATH + '/components/*/index.js'\r
}));\r
\r
\u62a5\u9519\u5982\u4e0b:\r
alias = Object.assign(alias, pickFiles({\r
^\r
TypeError: undefined is not a function\r
\r
\u6211\u5728\u7f51\u4e0a\u627e\u8fc7\u89e3\u51b3\u529e\u6cd5\uff0c\u90fd\u8bf4\u8fd9\u4e2a\u662f ES6 \u7684\u8bed\u6cd5\uff0c\u9700\u8981\u88c5\u76f8\u5173\u63d2\u4ef6\u53bb\u8f6c\u6210 ES5,\u4e8e\u662f\u4e4e\u6211\u88c5\u4e86\u4e00\u4e9b\u5217\u7684\u63d2\u4ef6\uff0c\u4f46\u90fd\u4e8e\u4e8b\u65e0\u8865\uff0c\u6545\u60f3\u8bf7\u6559\u4e0b\u5404\u4f4d\uff01\r
\u5e0c\u671b\u7ed9\u51fa\u5177\u4f53\u7684\u89e3\u51b3\u529e\u6cd5\uff0c\u8c22\u8c22\uff01", "date_published": "2016-07-22T03:29:06+00:00", "title": "\u5173\u4e8e webpack \u548c ES6 \u7684\u95ee\u9898", "id": "t/294146" }, { "author": { "url": "member/eromoe", "name": "eromoe", "avatar": "https://cdn.v2ex.com/gravatar/4f30a3d3b23cf96bacea4a197f6bbb71?s=73&d=retro" }, "url": "t/289114", "date_modified": "2017-06-05T06:37:42+00:00", "content_html": "

\u6211\u73b0\u5728\u7528 webpack devserver \u641e\u4e2a react \u7684\u4e1c\u897f

\n

\u7ed3\u6784\u5982\u4e0b

\n\n

\u600e\u4e48\u80fd\u5728 main.scss import \u76f8\u5bf9\u8def\u5f84 \u7684 scss \u6587\u4ef6\uff1f

\n

@import 'font-awesome/font-awesome.scss'; \u4e00\u65e6\u5199\u8fdb\u53bb\uff0c webpack devserver \u5c31\u5f00\u59cb\u62a5\u9519\u4e86\uff0c\n\u53ea\u6709\u653e\u5230 index.js \u91cc import \u624d\u884c

\n

so \u4e0a\u4e5f\u6709\u7c7b\u4f3c\u95ee\u9898 http://stackoverflow.com/questions/33649761/how-do-i-load-font-awesome-using-scss-sass-in-webpack-using-relative-paths

\n

\u6ca1\u6709\u89e3\u51b3\u529e\u6cd5

\n

webpack \u914d\u7f6e\uff1a

\n
const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'cheap-module-eval-source-map',\n entry: [\n 'eventsource-polyfill', // necessary for hot reloading with IE\n 'webpack-hot-middleware/client',\n './src/index'\n ],\n output: {\n path: path.join(__dirname, 'dist'),\n filename: 'bundle.js',\n publicPath: '/static/'\n },\n plugins: [\n /**\n * This is where the magic happens! You need this to enable Hot Module Replacement!\n */\n new webpack.HotModuleReplacementPlugin(),\n /**\n * NoErrorsPlugin prevents your webpack CLI from exiting with an error code if\n * there are errors during compiling - essentially, assets that include errors\n * will not be emitted. If you want your webpack to 'fail', you need to check out\n * the bail option.\n */\n new webpack.NoErrorsPlugin(),\n /**\n * DefinePlugin allows us to define free variables, in any webpack build, you can\n * use it to create separate builds with debug logging or adding global constants!\n * Here, we use it to specify a development build.\n */\n new webpack.DefinePlugin({\n 'process.env.NODE_ENV': JSON.stringify('development')\n }),\n ],\n module: {\n loaders: [\n {\n test: /\\.js?/,\n exclude: [/node_modules/, /styles/],\n loaders: ['babel'],\n include: path.join(__dirname, 'src')\n },\n {\n test: /\\.scss$/,\n loader: 'style!css!sass'\n },\n {\n test: /\\.css$/,\n loader: \"style-loader!css-loader\"\n },\n {\n test: /\\.woff(2)?(\\?v=[0-9]\\.[0-9]\\.[0-9])?$/,\n loader: 'url-loader?limit=10000&mimetype=application/font-woff'\n },\n {\n test: /\\.(ttf|eot|svg)(\\?v=[0-9]\\.[0-9]\\.[0-9])?$/,\n loader: 'file-loader'\n }\n ]\n }\n};\n\n
\n

\u6211\u53ea\u61c2\u57fa\u672c\u7684webpack\u914d\u7f6e\uff0c \u5c1d\u8bd5\u4e86\u4e0b\u6539 entry \u548coutput \u90fd\u6ca1\u5565\u7528\u3002\u3002\u3002

\n", "date_published": "2016-06-29T06:45:37+00:00", "title": "\u600e\u4e48\u5728 webpack devserver \u91cc \u7528\u76f8\u5bf9\u8def\u5f84 import scss(font-awesome)?", "id": "t/289114" }, { "author": { "url": "member/NicholasNC", "name": "NicholasNC", "avatar": "https://cdn.v2ex.com/avatar/f949/6bec/151349_large.png?m=1728962224" }, "url": "t/286262", "date_modified": "2017-06-05T06:37:07+00:00", "content_html": "

\u81ea\u5b66 react+redux \uff0c\u6559\u7a0b\u57fa\u672c\u4e0a\u90fd\u662f\u7528 ES6 \u5199\u7684\uff0c\u5e76\u4e14\u7528 webpack \u7ba1\u7406\u4f9d\u8d56\u3001\u6253\u5305\uff08\u6211\u7684 webpack \u662f 0 \u57fa\u7840\uff0c\u57fa\u672c\u4e0d\u4f1a\u7528\uff0c\u53ea\u662f\u770b\u4e86\u4e00\u4e9b\u5feb\u901f\u5165\u95e8\u6559\u7a0b\uff09\u3002

\n

\u73b0\u5728\u6709\u4e2a\u56f0\u60d1\uff0c\u600e\u6837\u8c03\u8bd5 webpack \u6253\u5305\u597d\u7684\u4ee3\u7801\uff1f webpack \u6253\u5305\u597d\u7684 bundle.js \uff0c\u4e00\u8138\u832b\u7136\uff0c\u6839\u672c\u770b\u4e0d\u61c2\uff0c\u66f4\u52a0\u4e0d\u7528\u8bf4\u8c03\u8bd5\u3002

\n

\u4e0d\u77e5\u5927\u795e\u6709\u6ca1\u6709\u6bd4\u8f83\u597d\u7684\u5efa\u8bae\u3002\u6307\u70b9\u6307\u70b9\u4e00\u4e0b\u5c0f\u5f1f

\n", "date_published": "2016-06-16T11:29:09+00:00", "title": "\u600e\u6837\u8c03\u8bd5 Webpack \u6253\u5305\u597d\u7684\u4ee3\u7801\u5417\uff1f", "id": "t/286262" }, { "author": { "url": "member/cxh116", "name": "cxh116", "avatar": "https://cdn.v2ex.com/avatar/7e7a/41b8/13872_large.png?m=1775747136" }, "url": "t/278255", "date_modified": "2017-06-05T06:37:28+00:00", "content_html": "

https://webpack.github.io/docs/code-splitting.html#split-app-and-vendor-code\n\u53c2\u8003\u6b64\u6587\u7684 \"Split app and vendor code\" , \u80fd\u628a js \u6587\u4ef6\u5206\u79bb\u51fa\u6765,\u4f46 css \u65e0\u6548

\n

\u6211\u7684 webpack \u914d\u7f6e

\n
var webpack = require(\"webpack\");\nvar ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\n\nmodule.exports = {\n entry: {\n app: \"./entry.js\",\n vendor: ['bootstrap'],\n },\n output: {\n path: __dirname + \"/dist\",\n filename: \"bundle.js\"\n },\n module: {\n loaders: [\n { test: /\\.less$/, loader: ExtractTextPlugin.extract(\"style-loader\", \"css-loader!less-loader\")},\n { test: /\\.css$/, loader: ExtractTextPlugin.extract(\"style-loader\", \"css-loader\") },\n { test: /\\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' },\n ]\n },\n plugins: [\n new webpack.optimize.CommonsChunkPlugin(/* chunkName= */\"vendor\", /* filename= */\"vendor.bundle.js\"),\n new ExtractTextPlugin(\"[name].bundle.css\", {allChunks: false}),\n ]\n};\n
\n

\u80fd\u751f\u6210 vendor.bundle.js \u6587\u4ef6,\u4e14\u6587\u4ef6\u5185\u5bb9\u5305\u542b bootstrap . \u4f46\u6ca1\u6709\u751f\u6210 vendor.bundle.css \u6587\u4ef6.\n\u662f extract-text-webpack-plugin \u4e0d\u652f\u6301\u5417?

\n

\u60f3\u5230\u4e00\u79cd\u6bd4\u8f83\u7b28\u7684\u529e\u6cd5,\u5c31\u662f\u518d\u5efa\u4e00\u4e2a css_entry.js \u6587\u4ef6, \u5728\u6587\u4ef6\u91cc\u9762\u8c03\u7528 require('./node_modules/bootstrap/less/bootstrap.less') ,\u4f46\u611f\u89c9\u8fd9\u4e2a\u529e\u6cd5\u6709\u70b9\u6413...

\n

\u6709\u4ec0\u4e48\u66f4\u597d\u89e3\u51b3\u65b9\u6848\u7684\u670b\u53cb\u5417?

\n", "date_published": "2016-05-12T10:44:10+00:00", "title": "webpack \u7684 Code Splitting \u4e0d\u652f\u6301\u7b2c\u4e09\u65b9 css \u5417?", "id": "t/278255" }, { "author": { "url": "member/shuson", "name": "shuson", "avatar": "https://cdn.v2ex.com/avatar/2562/e666/29065_large.png?m=1565256978" }, "url": "t/230137", "date_modified": "2017-06-05T06:37:00+00:00", "content_html": "

\u4e3a\u4e86\u8ddf\u4e0a\u524d\u7aef\u754c\u6309\u5468\u66f4\u65b0\u6280\u80fd\u7684\u5468\u671f\uff0c\u770b\u5230\u5f88\u591a react \u9879\u76ee\u5728\u4f7f\u7528 webpack \uff0c\u6211\u4e5f\u624b\u75d2\u3002\u4e8e\u662f\u4e4e\u8bd5\u8bd5\u3002

\n\n

\u95ee\u9898 1 \uff1a webpack \u65e2\u7136\u548c browserify \u662f\u4e00\u4e2a\u7c7b\u578b\u7684\uff0c\u5f53\u7136\uff0c\u5f3a\u5927\u4e86\u8bb8\u591a\uff0c\u5c45\u7136\u53ef\u4ee5\u628a css \u4e5f\u5f53\u505a\u4e86 compile to js \u6765\u4f7f\u7528\u3002 gulp \u4e5f\u6709\u5f88\u591a\u63d2\u4ef6\u5b8c\u6210 coffee script \u6216\u8005 es6 \u5230 js \u7684\u8fc7\u7a0b\u3002\u4e3a\u4f55\u8fd9\u4e2a\u8f6e\u5b50\u9020\u51fa\u6765\u4e86\u3002\u96be\u9053\u662f\u4e3a\u4e86\u7edf\u4e00 AMD \u548c commonjs \u4e0d\u540c module loading \u95ee\u9898\uff1f

\n\n

\u95ee\u9898 2 \uff1a learning curve \u6709\u70b9\u9661\u554a\uff0c\u4e0d\u50cf gulp \u4e00\u4e0a\u5348\u5c31\u77e5\u9053\u600e\u4e48\u7528\u4e86\u3002 \u5c0f\u9879\u76ee\u4f7f\u7528\u662f\u4e0d\u662f\u6709\u70b9\u8fc7\uff1f

\n\n

\u611a\u89c1\uff0c\u55b7\u5427\uff0c\u53cd\u6b63\u4e5f\u662f\u5b66\u4e60\u3002

\n", "date_published": "2015-10-22T04:16:55+00:00", "title": "\u524d\u7aef\u8f6e\u5b50\u4eec\uff1a gulp \u548c webpack \u662f\u4e0d\u662f\u6709\u529f\u80fd\u4e0a\u7684 overlap", "id": "t/230137" }, { "author": { "url": "member/mysoko", "name": "mysoko", "avatar": "https://cdn.v2ex.com/avatar/35d0/2fef/4220_large.png?m=1353423824" }, "url": "t/198538", "date_modified": "2017-06-05T06:37:32+00:00", "content_html": "", "date_published": "2015-06-14T15:45:31+00:00", "title": "gulp \u548c webpack \u533a\u522b", "id": "t/198538" }, { "author": { "url": "member/phx13ye", "name": "phx13ye", "avatar": "https://cdn.v2ex.com/gravatar/e589f3bcac3d146c80b717b18c16ac1e?s=73&d=retro" }, "url": "t/196965", "date_modified": "2017-06-05T06:37:04+00:00", "content_html": "\u5728HTML\u6587\u4ef6\u4e2d\u5982\u679c\u6709\r
```html\r
<script src="./src/js/A.js"></script>\r
<script src="./src/js/B.js"></script>\r
```\r
wepack\u4e4b\u540e\uff0cA\uff0cB\u7684\u6e90\u7801\u5408\u5e76\u5e76\u538b\u7f29\u4e3abundle.js\r
\u6709\u4ec0\u4e48\u65b9\u6cd5\u53ef\u4ee5\u6539\u4e3a\r
```html\r
<script src="./build/js/bundle.js"></script>\r
```", "date_published": "2015-06-08T08:42:37+00:00", "title": "Webpack \u600e\u4e48\u6539 html \u4e2d\u7684 js \u8def\u5f84\uff1f", "id": "t/196965" } ] } ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86