Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack 官方文档之entry-points #49

Open
Christian-health opened this issue Mar 22, 2018 · 5 comments
Open

webpack 官方文档之entry-points #49

Christian-health opened this issue Mar 22, 2018 · 5 comments

Comments

@Christian-health
Copy link
Owner

https://doc.webpack-china.org/concepts/entry-points

@Christian-health
Copy link
Owner Author

demo1

@Christian-health
Copy link
Owner Author

demo2

@Christian-health
Copy link
Owner Author

demo3

@Christian-health
Copy link
Owner Author

"entry": {
    "main": [
        //这里会把main.ts相应的所有的文件打包生成一个main.随机数.bundle.js
      "./src/main.ts"
    ],
    "polyfills": [
       //这里会把polyfills.ts相应的所有的文件打包生成一个polyfills.随机数.bundle.js
      "./src/polyfills.ts"
    ],
    "scripts": [
    //这里会把scripts数组中的所有js文件打包到一起生成一个script.随机数.bundle.js这样的文件
    //这里是需要改进的,我可以把scripts拆分成scripts1然后是部分数组,然后是scripts2部分数组,然后是scripts3部分数组
      "script-loader!./node_modules/jquery/dist/jquery.min.js",
      "script-loader!./node_modules/tether/dist/js/tether.js",
      "script-loader!./node_modules/bootstrap/dist/js/bootstrap.min.js",
      "script-loader!./node_modules/echarts/dist/echarts.js",
      "script-loader!./node_modules/underscore/underscore-min.js",
      "script-loader!./node_modules/bootstrap-table/dist/bootstrap-table.js",
      "script-loader!./node_modules/bootstrap-table/dist/bootstrap-table-locale-all.min.js",
      "script-loader!./node_modules/d3/build/d3.min.js",
      "script-loader!./node_modules/xlsx/xlsx.js",
      "script-loader!./node_modules/js-yaml/dist/js-yaml.min.js",
      "script-loader!./node_modules/js-yaml/dist/js-yaml.js",
      "script-loader!./src/assets/libs/date_time/WdatePicker.js",
      "script-loader!./src/assets/libs/date_time/calendar.js"
    ],
    //这里生成styles.随机数.bundle.css文件
    "styles": [
      "./src/styles.less"
    ]
  },

@Christian-health
Copy link
Owner Author

output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant