我是webpack的新手,我按照此链接https://github.com/hardikkaji/angularjs-es6-starter-kit
中的说明进行操作我正在使用角度为1.7的webpack 4
我无法解析图像。
./node_modules/angular-datatables/demo/basic/overrideLoadingTpl.html中的错误 找不到模块:错误:无法解析“ / home / user / workspace / webpack / angular-webpack / node_modules / angular-datatables / demo / basic”中的“ ./images/loading.gif”
我的webpack.config.js在下面
const config = { mode: devMode ? 'development' : 'production', entry: { 'vendor': './frontend/vendor.module.js', //seperates all 3rd party plugins like ui-router, retstangualr etc 'app': './frontend/index.main.js' //main entry point for angular js }, devtool: devMode ? 'source-map': 'none', output: { filename: elixirConfig.js.outputFolder + '/[name].[hash].bundle.js', //filename: 'libs/[name].[hash].bundle.js', //where to store the generated files all files will be generated inside a folder called libs //path: path.resolve(__dirname, 'build') path: path.resolve(__dirname, elixirConfig.buildPath) }, module: { rules: [ { test: /.js$/, //check for file that ends with .js extension exclude: /node_modules/, //do not check for files inside node_modules folder loader: ['ng-annotate-loader', 'babel-loader'], //presets: ['es2016'], }, { test: /.(scss)$/, //check for files that end with scss use: [ devMode ? { loader: "style-loader" } : MiniCssExtractPlugin.loader, { loader: "css-loader", options: { minimize: true } }, { loader: "sass-loader" }, ] }, // for fixing of loading bootstrap icon files { test: /.(png|jpg|jpeg|gif|svg|woff|woff2)$/, loader: 'url-loader?limit=10000', options: { name: './fonts/[name].[ext]' } }, { test: /.(woff(2)?|ttf|eot|svg)(\?v=\d+.\d+.\d+)?$/, loader: 'file-loader', options: { name: './fonts/[name].[ext]' } }, { test: /.html$/, include: /node_modules/, loader: 'html-loader' }, ] },