我的webpack配置 代码 var webpack = require('webpack');var htmlPlugin = require('html-webpack-plugin');var ExtractTextPlugin = require('extract-text-webpack-plugin');var autoprefixer = require('autoprefixer');var CleanWebpackPlugin = require('clean-webpack-plugin');var path = require('path');var webpack = { entry: { app:'./www/modules/base/app.js' }, output: { path: path.join(__dirname, './dist'), filename: 'js/bundle[hash].js' }, module: { rules: [ { test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: 'style-loader', use: [ 'css-loader', 'postcss-loader'] }) }, { test: /\.(png|gif|swf|jpg|pkg|PNG|GIF|SWF|JPG|PKG)$/, use: ['file-loader'] } ] }, plugins: [ new htmlPlugin({ template: './www/index.html', filename: 'index.html', }), new CleanWebpackPlugin(['build'], { root: '', // An absolute path for the root of webpack.config.js verbose: true,// Write logs to console. dry: false // Do not delete anything, good for testing. }), new ExtractTextPlugin("css/[name]-[chunkhash:8].css"), new webpack.LoaderOptionsPlugin({ options: { postcss: [autoprefixer()] } }) ], resolve: { // 第一项空字符串必不可少,否则报模块错误 extensions: ['.js', '.css', '.es6'] }};module.exports = webpack;define(['ionic', 'asyncLoader', 'resource', 'ngcordova', 'translate-loader-static'], function (ionic,asyncLoader) { var app = angular.module('app', ['ui.router', 'ionic', 'ngResource', 'ngCordova', 'pascalprecht.translate'] ); asyncLoader.configure(app); return app;});我的app入口文件 但是一打包就会提示这些以来的模块找不到,该如何解决呢。 求问,解决了有红包谢谢大神们
添加回答
举报
0/150
提交
取消