1.0.0 • Published 8 years ago
path-file-loader v1.0.0
path-file loader for webpack
Installation
npm install path-file-loader --save-dev
Statement
Changes in the project file-loader
Usage
Keep the use of file-loader
Q: Why change the components?
A: Because of previous methods there is no way to change the path, so add the two variables for configuration.
Add parameters
publicPath
Provide the output path configurationcssPath
Provide modified CSS path configuration
Example
webpackConfig
module.exports = {
module: {
loaders: [
{
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$/,
loader: 'path-file-loader',
query:{
name: '[name].[hash].[ext]',
publicPath: './images/',
cssPath: '../images/'
}
}
]
}
};
modifier
1.0.0
8 years ago