We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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的配置文件 build: { index: path.resolve(__dirname, '../ROOT/index.html'), assetsRoot: path.resolve(__dirname, '../ROOT'), // index: path.resolve(__dirname, '../plat/index.html'), // assetsRoot: path.resolve(__dirname, '../plat'), assetsSubDirectory: 'static', assetsPublicPath: './', productionSourceMap: false, devtool: '#source-map', productionGzip: false, productionGzipExtensions: ['js', 'css'], bundleAnalyzerReport: process.env.npm_config_report } 这里我希望引用的静态资源带有打包文件的路径,但是没有出现 浏览器查找的路径 E:/static/UEditor/ueditor.config.js 真实的路径 E:\workspace\open-system\open-system\static
The text was updated successfully, but these errors were encountered:
你是不把 assetsPublicPath: '/' 改成了 assetsPublicPath: './' 而且项目没有部署在网站的根目录下?如果是那样的话,你填 UEDITOR_HOME_URL: './static/UEditor/' 试一试
assetsPublicPath: '/'
assetsPublicPath: './'
UEDITOR_HOME_URL: './static/UEditor/'
Sorry, something went wrong.
不的英文把你assetsPublicPath: '/' 改成了assetsPublicPath: './'而且在项目没有部署网站的根目录下?如果是那样的话,你填UEDITOR_HOME_URL: './static/UEditor/'试一试
谢谢,已经解决了问题,不过我很困惑,为什么之前没有出现这样的情况,这样短暂的解决问题不知道部署到网站上会不会出现新的问题,不过还是非常感谢你
@bosens-China 相当路径,绝对路径,webpack构建等等都了解一下,而且见过不少人因为路由使用 history 模式又设置了相对路径而出错的,总之这个要具体问题具体分析。有些特殊情况也可能需要用到process.env.NODE_ENV 区分设置,我在 README 里也都提过
No branches or pull requests
webpack的配置文件
build: {
index: path.resolve(__dirname, '../ROOT/index.html'),
assetsRoot: path.resolve(__dirname, '../ROOT'),
// index: path.resolve(__dirname, '../plat/index.html'),
// assetsRoot: path.resolve(__dirname, '../plat'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
productionSourceMap: false,
devtool: '#source-map',
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
bundleAnalyzerReport: process.env.npm_config_report
}
这里我希望引用的静态资源带有打包文件的路径,但是没有出现
浏览器查找的路径
E:/static/UEditor/ueditor.config.js
真实的路径
E:\workspace\open-system\open-system\static
The text was updated successfully, but these errors were encountered: