Prezados, Estou seguindo as aulas das dicas de como importar o bootstrap ou outro arquivo css no projeto, mais esta dando erro ao renderizar, por exemplo,tento importar o css que esta dentro da pasta assets/css/style.css no aquivo main.js
Failed to compile.
./node_modules/css-loader!./node_modules/css-loader!./node_modules/style-loader!./src/assets/css/style.css
Module build failed: Unknown word (5:1)
3 | // load the styles
4 | var content = require("!!./style.css");
> 5 | if(typeof content === 'string') content = [[module.id, content, '']];
| ^
6 | // add the styles to the DOM
7 | var update = require("!../../../node_modules/style-loader/addStyles.js")(content, {});
8 | if(content.locals) module.exports = content.locals;
@ ./src/assets/css/style.css 4:14-166 13:3-17:5 14:22-174
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
O mesmo ocorre com o bootstrap.
Este é o arquivo package,json:
{
"name": "alurapic",
"description": "A Vue.js project",
"version": "1.0.0",
"author": "",
"license": "MIT",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"bootstrap": "^3.3.7",
"vee-validate": "^2.0.0-beta.18",
"vue": "^2.4.4",
"vue-resource": "^1.0.3",
"vue-router": "^2.1.1"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.0.5",
"css-loader": "^0.25.0",
"file-loader": "^1.1.4",
"style-loader": "^0.13.2",
"url-loader": "^0.5.7",
"vue-loader": "^13.0.5",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.1"
}
}
Este é a chamada do css no main.js
....
// import 'bootstrap/dist/css/bootstrap.css';
import './assets/css/style.css';
Este é parte do script n o arquivo webpack.config:
rules: [
{
test: /\.css$/,
use : [
'vue-style-loader',
'css-loader'
],
}, {
test : /\.vue$/,
loader : 'vue-loader',
options: {
loaders: {
'scss': 'vue-style-loader!css-loader!sass-loader',
'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax'
}
// other vue-loader options go here
}
},
{
test : /\.js$/,
loader : 'babel-loader',
exclude: /node_modules/
},
{
test : /\.(png|jpg|gif|svg)$/,
loader : 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
},
{
test: /\.css$/,
use : [
'css-loader',
'style-loader'
]
},
{
test : /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
loader: 'url-loader?limit=10000&mimetype=application/font-woff'
},
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=10000&mimetype=application/octet-stream' },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader' },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=10000&mimetype=image/svg+xml' }
]
Que poderia estar acontecendo?? obrigado pela atenção.