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

index.ejs 没有自动引入 dll 文件 #381

Open
sorrycc opened this issue Aug 14, 2017 · 7 comments
Open

index.ejs 没有自动引入 dll 文件 #381

sorrycc opened this issue Aug 14, 2017 · 7 comments

Comments

@sorrycc
Copy link
Owner

sorrycc commented Aug 14, 2017

No description provided.

@yangbin1994
Copy link

  <%= htmlWebpackPlugin.options.development ? '<script type="text/javascript" src="' + htmlWebpackPlugin.options.publicPath + 'roadhog.dll.js"></script>' : undefined %>

@ouzhou
Copy link

ouzhou commented Sep 4, 2017

为啥大家不怎么关注这个bug,难道用dllPlugin的是少数吗

@holynova
Copy link

holynova commented Sep 6, 2017

@yangbin1994 你发的这一段代码是什么意思?

@yangbin1994
Copy link

yangbin1994 commented Sep 6, 2017

webpack.config.js @holynova

  webpackConfig.module.rules[0].exclude.push(/\.ejs$/)
  webpackConfig.plugins = webpackConfig.plugins.concat([
    new HtmlWebpackPlugin({
      hash: true,
      production,
      development,
      template: `ejs!src/index.ejs`,
      minify: production ? { collapseWhitespace: true } : undefined,
      publicPath: webpackConfig.output.publicPath,
    }),
  ])

@holynova
Copy link

holynova commented Sep 6, 2017

@yangbin1994 也就是说额外创建一个webpack.config.js 文件, 内容如上一楼,作用是在index.ejs文件中自动添加dll文件
是这么理解么?

@yangbin1994
Copy link

@holynova 是的

@ouzhou
Copy link

ouzhou commented Sep 6, 2017

具体可以参考https://github.com/zuiidea/antd-admin/blob/master/webpack.config.js#L35
如果不想写额外的webpack.config.js怎么做呢。等修复吧

grunmin added a commit to grunmin/roadhog that referenced this issue Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants