-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I can't get sourcemap bundling working with Bootstrap's CSS, and after some investigation, it seems like it might be an Atomify bug.
It works fine in prodution mode, but I get an error such as the following when running with --debug:
{ [Error: ENOENT, no such file or directory '../node_modules/bootstrap/dist/css/bootstrap.css.map']
errno: 34,
code: 'ENOENT',
path: '../node_modules/bootstrap/dist/css/bootstrap.css.map',
syscall: 'open' }
The .map file does in fact exist (although I don't know what the path is relative to)
Here's a minimal package.json which you can use to reproduce the problem by running npm run bundle-dev:
{
"name": "atomify-bootstrap-test",
"version": "0.1.0",
"description": "Debug Atomify problem with Bootstrap CSS",
"scripts": {
"bundle-dev": "atomify --debug",
"bundle": "atomify"
},
"dependencies": {
"atomify": "^6.1.0",
"bootstrap": "^3.3.4",
"resrcify": "^1.1.3"
},
"atomify": {
"css": {
"entry": "client/main.css",
"output": "public/bundle.css"
},
"assets": {
"dest": "public/assets",
"prefix": "../assets/"
}
}
}
The only other file you need is a CSS file at 'client/main.css' containing the line
@import "bootstrap";
I should point out that invoking rework-npm from the CLI doesn't generate such errors (and there is indeed a source map in the CSS, although I haven't checked if it's accurate)
./node_modules/rework-npm-cli/index.js client/main.css -m -o public/bundle.css
(Not sure if this should be an Atomify bug, but I'll leave that up to the maintainers to decide)