任何时候我试着运行安可,它都不能完成并且挂在...
$ /vagrant/app/node_modules/.bin/encore dev
Running webpack ...
我已经按照Symfony文档多次删除并重新安装了node_modules
。已尝试仅使用npm
,也尝试仅使用yarn
。任何建议都将不胜感激。我已经包含了package.json
和webpack.config.js
,如果还有任何需要帮助的地方,请让我知道。
package.json
{
"devDependencies": {
"@symfony/webpack-encore": "^0.20.1",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.3"
}
}
webpack.config.js
var Encore = require('@symfony/webpack-encore');
Encore
// the project directory where compiled assets will be stored
.setOutputPath('public/build/')
// the public path used by the web server to access the previous directory
.setPublicPath('/app/build')
.setManifestKeyPrefix('build')
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
// uncomment if you use Sass/SCSS files
.enableSassLoader()
// uncomment to create hashed filenames (e.g. app.abc123.css)
// .enableVersioning(Encore.isProduction())
// uncomment to define the assets of the project
// .addEntry('js/app', './assets/js/app.js')
.addStyleEntry('css/style', './assets/sass/style.scss')
// .addStyleEntry('css/print', './assets/sass/print.scss')
// uncomment for legacy applications that require $/jQuery as a global variable
// .autoProvidejQuery()
;
module.exports = Encore.getWebpackConfig();
发布于 2018-06-12 04:05:31
我发现了问题所在。我不得不在我的sass加载器选项中禁用resolveUrlLoader
。
.enableSassLoader(function(options) {}, {
resolveUrlLoader: false
})
https://stackoverflow.com/questions/50803304
复制相似问题